Skip to content

Commit 252513f

Browse files
committed
---
yaml --- r: 153341 b: refs/heads/try2 c: ad82cb5 h: refs/heads/master i: 153339: 3f54e92 v: v3
1 parent bc60d1c commit 252513f

File tree

37 files changed

+360
-865
lines changed

37 files changed

+360
-865
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 5ad7286dc37839b7234ff51aab172e48935869d8
8+
refs/heads/try2: ad82cb5621820526cf2d32651c063f6b7a2ea255
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/man/rustc.1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ This program is a compiler for the Rust language, available at
1111

1212
.SH OPTIONS
1313

14-
.TP
15-
\fB\-\-crate-name NAME\fR
16-
Specify the name of the crate being built
1714
.TP
1815
\fB\-\-crate-type=[bin|lib|dylib|rlib|staticlib]\fR
1916
Configure the flavor of rust crate that is generated (default `bin`)

branches/try2/mk/install.mk

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,16 @@ else
1414
MAYBE_DISABLE_VERIFY=
1515
endif
1616

17-
install: dist-install-dir-$(CFG_BUILD)-with-target-libs | tmp/empty_dir
18-
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" "$(MAYBE_DISABLE_VERIFY)"
17+
install: dist-install-dir-$(CFG_BUILD)-with-target-libs
18+
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" "$(MAYBE_DISABLE_VERIFY)"
1919
# Remove tmp files while we can because they may have been created under sudo
2020
$(Q)rm -R tmp/dist
2121

22-
uninstall: dist-install-dir-$(CFG_BUILD)-with-target-libs | tmp/empty_dir
23-
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
22+
uninstall: dist-install-dir-$(CFG_BUILD)-with-target-libs
23+
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
2424
# Remove tmp files while we can because they may have been created under sudo
2525
$(Q)rm -R tmp/dist
2626

27-
tmp/empty_dir:
28-
mkdir -p $@
2927

3028
######################################################################
3129
# Android remote installation

branches/try2/src/etc/install.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,7 @@ then
489489
err "${ERR}"
490490
else
491491
echo
492-
echo " please ensure '${CFG_PREFIX}/lib' is added to ${CFG_LD_PATH_VAR}"
493-
echo
492+
echo " Note: please ensure '${CFG_PREFIX}/lib' is added to ${CFG_LD_PATH_VAR}"
494493
fi
495494
fi
496495
fi

branches/try2/src/etc/zsh/_rust

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ _rustc_opts_switches=(
99
-c'[Compile and assemble, but do not link]'
1010
--cfg'[Configure the compilation environment]'
1111
--crate-id'[Output the crate id and exit]'
12-
--crate-file-name'[deprecated in favor of --print-file-name]'
13-
--crate-name'[Specify the name of the crate being built]'
14-
--crate-type'[Specify the type of crate to crate]'
15-
--debuginfo'[Emit DWARF debug info to the objects created: 0 = no debug info, 1 = line-tables only (for stacktraces and breakpoints), 2 = full debug info with variable and type information (same as -g)]'
12+
--crate-file-name'[Output the file(s) that would be written if compilation continued and exit]'
13+
--crate-name'[Output the crate name and exit]'
1614
--dep-info'[Output dependency info to <filename> after compiling]'
17-
-g'[Equivalent to --debuginfo=2]'
15+
--crate-type'[Specify the type of crate to crate]'
1816
{-h,--help}'[Display this message]'
1917
-L'[Add a directory to the library search path]'
2018
--linker'[Program to use for linking instead of the default.]'
@@ -31,8 +29,6 @@ _rustc_opts_switches=(
3129
--parse-only'[Parse only; do not compile, assemble, or link]'
3230
--passes'[Comma or space separated list of pass names to use]'
3331
--pretty'[Pretty-print the input instead of compiling]'
34-
--print-crate-name'[Output the crate name and exit]'
35-
--print-file-name'[Output the file(s) that would be written if compilation continued and exit]'
3632
--save-temps'[Write intermediate files (.bc, .opt.bc, .o) in addition to normal output]'
3733
--sysroot'[Override the system root]'
3834
--test'[Build a test harness]'

branches/try2/src/libcollections/hash/sip.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ pub fn hash_with_keys<T: Hash<SipState>>(k0: u64, k1: u64, value: &T) -> u64 {
269269
mod tests {
270270
use test::Bencher;
271271
use std::prelude::*;
272-
use std::fmt;
272+
use std::num::ToStrRadix;
273273

274274
use str::Str;
275275
use string::String;
@@ -370,7 +370,7 @@ mod tests {
370370
fn to_hex_str(r: &[u8, ..8]) -> String {
371371
let mut s = String::new();
372372
for b in r.iter() {
373-
s.push_str(format!("{}", fmt::radix(*b, 16)).as_slice());
373+
s.push_str((*b as uint).to_str_radix(16u).as_slice());
374374
}
375375
s
376376
}
@@ -391,7 +391,7 @@ mod tests {
391391
let r = result_bytes(h);
392392
let mut s = String::new();
393393
for b in r.iter() {
394-
s.push_str(format!("{}", fmt::radix(*b, 16)).as_slice());
394+
s.push_str((*b as uint).to_str_radix(16u).as_slice());
395395
}
396396
s
397397
}

branches/try2/src/libcore/atomics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl AtomicBool {
141141
///
142142
/// fn with_lock(spinlock: &Arc<AtomicBool>, f: || -> ()) {
143143
/// // CAS loop until we are able to replace `false` with `true`
144-
/// while spinlock.compare_and_swap(false, true, SeqCst) != false {
144+
/// while spinlock.compare_and_swap(false, true, SeqCst) == false {
145145
/// // Since tasks may not be preemptive (if they are green threads)
146146
/// // yield to the scheduler to let the other task run. Low level
147147
/// // concurrent code needs to take into account Rust's two threading

branches/try2/src/libgreen/lib.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,18 +164,10 @@
164164
//! possibly pinned to a particular scheduler thread:
165165
//!
166166
//! ```rust
167-
//! extern crate green;
168-
//! extern crate rustuv;
169-
//!
170-
//! # fn main() {
171167
//! use std::task::TaskBuilder;
172168
//! use green::{SchedPool, PoolConfig, GreenTaskBuilder};
173169
//!
174-
//! let mut config = PoolConfig::new();
175-
//!
176-
//! // Optional: Set the event loop to be rustuv's to allow I/O to work
177-
//! config.event_loop_factory = rustuv::event_loop;
178-
//!
170+
//! let config = PoolConfig::new();
179171
//! let mut pool = SchedPool::new(config);
180172
//!
181173
//! // Spawn tasks into the pool of schedulers
@@ -203,7 +195,6 @@
203195
//! // Required to shut down this scheduler pool.
204196
//! // The task will fail if `shutdown` is not called.
205197
//! pool.shutdown();
206-
//! # }
207198
//! ```
208199
209200
#![crate_name = "green"]

branches/try2/src/librustc/metadata/creader.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ impl<'a> PluginMetadataReader<'a> {
446446
should_match_name: true,
447447
};
448448
let library = match load_ctxt.maybe_load_library_crate() {
449-
Some(l) => l,
449+
Some (l) => l,
450450
None if is_cross => {
451451
// try loading from target crates (only valid if there are
452452
// no syntax extensions)
@@ -473,14 +473,6 @@ impl<'a> PluginMetadataReader<'a> {
473473
let registrar = decoder::get_plugin_registrar_fn(library.metadata.as_slice()).map(|id| {
474474
decoder::get_symbol(library.metadata.as_slice(), id)
475475
});
476-
if library.dylib.is_none() && registrar.is_some() {
477-
let message = format!("plugin crate `{}` only found in rlib format, \
478-
but must be available in dylib format",
479-
info.ident);
480-
self.env.sess.span_err(krate.span, message.as_slice());
481-
// No need to abort because the loading code will just ignore this
482-
// empty dylib.
483-
}
484476
let pc = PluginMetadata {
485477
lib: library.dylib.clone(),
486478
macros: macros,

branches/try2/src/librustc/metadata/encoder.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -693,10 +693,6 @@ fn encode_info_for_struct(ecx: &EncodeContext,
693693
encode_name(ebml_w, nm);
694694
encode_type(ecx, ebml_w, node_id_to_type(tcx, id));
695695
encode_def_id(ebml_w, local_def(id));
696-
697-
let stab = stability::lookup(ecx.tcx, field.id);
698-
encode_stability(ebml_w, stab);
699-
700696
ebml_w.end_tag();
701697
}
702698
index

branches/try2/src/librustc/middle/stability.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
use util::nodemap::{NodeMap, DefIdMap};
1515
use syntax::codemap::Span;
1616
use syntax::{attr, visit};
17-
use syntax::ast;
1817
use syntax::ast::{Attribute, Block, Crate, DefId, FnDecl, NodeId, Variant};
1918
use syntax::ast::{Item, Required, Provided, TraitMethod, TypeMethod, Method};
20-
use syntax::ast::{Generics, StructDef, StructField, Ident};
19+
use syntax::ast::{Generics, StructDef, Ident};
2120
use syntax::ast_util::is_local;
2221
use syntax::attr::Stability;
2322
use syntax::visit::{FnKind, FkMethod, Visitor};
@@ -92,11 +91,6 @@ impl Visitor<Option<Stability>> for Annotator {
9291
s.ctor_id.map(|id| self.annotate(id, &[], parent.clone()));
9392
visit::walk_struct_def(self, s, parent)
9493
}
95-
96-
fn visit_struct_field(&mut self, s: &StructField, parent: Option<Stability>) {
97-
let stab = self.annotate(s.node.id, s.node.attrs.as_slice(), parent);
98-
visit::walk_struct_field(self, s, stab)
99-
}
10094
}
10195

10296
impl Index {
@@ -108,8 +102,8 @@ impl Index {
108102
extern_cache: DefIdMap::new()
109103
}
110104
};
111-
let stab = annotator.annotate(ast::CRATE_NODE_ID, krate.attrs.as_slice(), None);
112-
visit::walk_crate(&mut annotator, krate, stab);
105+
visit::walk_crate(&mut annotator, krate,
106+
attr::find_stability(krate.attrs.as_slice()));
113107
annotator.index
114108
}
115109
}

branches/try2/src/librustdoc/clean/mod.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,15 +1461,12 @@ impl Clean<Item> for ty::VariantInfo {
14611461
name: Some(name.clean()),
14621462
attrs: Vec::new(),
14631463
visibility: Some(ast::Public),
1464+
stability: get_stability(self.id),
14641465
// FIXME: this is not accurate, we need an id for
14651466
// the specific field but we're using the id
1466-
// for the whole variant. Thus we read the
1467-
// stability from the whole variant as well.
1468-
// Struct variants are experimental and need
1469-
// more infrastructure work before we can get
1470-
// at the needed information here.
1467+
// for the whole variant. Nothing currently
1468+
// uses this so we should be good for now.
14711469
def_id: self.id,
1472-
stability: get_stability(self.id),
14731470
inner: StructFieldItem(
14741471
TypedStructField(ty.clean())
14751472
)
@@ -1485,7 +1482,7 @@ impl Clean<Item> for ty::VariantInfo {
14851482
visibility: Some(ast::Public),
14861483
def_id: self.id,
14871484
inner: VariantItem(Variant { kind: kind }),
1488-
stability: get_stability(self.id),
1485+
stability: None,
14891486
}
14901487
}
14911488
}
@@ -1893,7 +1890,7 @@ impl Clean<Item> for ast::ForeignItem {
18931890
source: self.span.clean(),
18941891
def_id: ast_util::local_def(self.id),
18951892
visibility: self.vis.clean(),
1896-
stability: get_stability(ast_util::local_def(self.id)),
1893+
stability: None,
18971894
inner: inner,
18981895
}
18991896
}

branches/try2/src/librustdoc/html/format.rs

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ use syntax::ast;
2222
use syntax::ast_util;
2323

2424
use clean;
25-
use stability_summary::ModuleSummary;
2625
use html::item_type;
2726
use html::item_type::ItemType;
2827
use html::render;
@@ -632,72 +631,3 @@ impl<'a> fmt::Show for ConciseStability<'a> {
632631
}
633632
}
634633
}
635-
636-
impl fmt::Show for ModuleSummary {
637-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
638-
fn fmt_inner<'a>(f: &mut fmt::Formatter,
639-
context: &mut Vec<&'a str>,
640-
m: &'a ModuleSummary)
641-
-> fmt::Result {
642-
let cnt = m.counts;
643-
let tot = cnt.total();
644-
if tot == 0 { return Ok(()) }
645-
646-
context.push(m.name.as_slice());
647-
let path = context.connect("::");
648-
649-
// the total width of each row's stability summary, in pixels
650-
let width = 500;
651-
652-
try!(write!(f, "<tr>"));
653-
try!(write!(f, "<td class='summary'>\
654-
<a class='summary' href='{}'>{}</a></td>",
655-
Vec::from_slice(context.slice_from(1))
656-
.append_one("index.html").connect("/"),
657-
path));
658-
try!(write!(f, "<td>"));
659-
try!(write!(f, "<span class='summary Stable' \
660-
style='width: {}px; display: inline-block'>&nbsp</span>",
661-
(width * cnt.stable)/tot));
662-
try!(write!(f, "<span class='summary Unstable' \
663-
style='width: {}px; display: inline-block'>&nbsp</span>",
664-
(width * cnt.unstable)/tot));
665-
try!(write!(f, "<span class='summary Experimental' \
666-
style='width: {}px; display: inline-block'>&nbsp</span>",
667-
(width * cnt.experimental)/tot));
668-
try!(write!(f, "<span class='summary Deprecated' \
669-
style='width: {}px; display: inline-block'>&nbsp</span>",
670-
(width * cnt.deprecated)/tot));
671-
try!(write!(f, "<span class='summary Unmarked' \
672-
style='width: {}px; display: inline-block'>&nbsp</span>",
673-
(width * cnt.unmarked)/tot));
674-
try!(write!(f, "</td></tr>"));
675-
676-
for submodule in m.submodules.iter() {
677-
try!(fmt_inner(f, context, submodule));
678-
}
679-
context.pop();
680-
Ok(())
681-
}
682-
683-
let mut context = Vec::new();
684-
685-
try!(write!(f,
686-
r"<h1 class='fqn'>Stability dashboard: crate <a class='mod' href='index.html'>{}</a></h1>
687-
This dashboard summarizes the stability levels for all of the public modules of
688-
the crate, according to the total number of items at each level in the module and its children:
689-
<blockquote>
690-
<a class='stability Stable'></a> stable,<br/>
691-
<a class='stability Unstable'></a> unstable,<br/>
692-
<a class='stability Experimental'></a> experimental,<br/>
693-
<a class='stability Deprecated'></a> deprecated,<br/>
694-
<a class='stability Unmarked'></a> unmarked
695-
</blockquote>
696-
The counts do not include methods or trait
697-
implementations that are visible only through a re-exported type.",
698-
self.name));
699-
try!(write!(f, "<table>"))
700-
try!(fmt_inner(f, &mut context, self));
701-
write!(f, "</table>")
702-
}
703-
}

0 commit comments

Comments
 (0)