Skip to content

Commit 3040621

Browse files
committed
---
yaml --- r: 274979 b: refs/heads/stable c: 040cbc4 h: refs/heads/master i: 274977: ae64f38 274975: bd534fe
1 parent 1a0c54c commit 3040621

File tree

30 files changed

+88
-248
lines changed

30 files changed

+88
-248
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 4f86b8e7323b6b50315c3298e6f809d92a4c4c4f
32+
refs/heads/stable: 040cbc4566962faa402780b68918b188a5346522
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/mk/crates.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_
5959
rustc_data_structures rustc_front rustc_platform_intrinsics \
6060
rustc_plugin rustc_metadata rustc_passes
6161
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros
62-
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
62+
TOOLS := compiletest rustdoc rustc rustbook error-index-generator
6363

6464
DEPS_core :=
6565
DEPS_alloc := core libc alloc_system
@@ -120,12 +120,12 @@ TOOL_DEPS_compiletest := test getopts
120120
TOOL_DEPS_rustdoc := rustdoc
121121
TOOL_DEPS_rustc := rustc_driver
122122
TOOL_DEPS_rustbook := std rustdoc
123-
TOOL_DEPS_error_index_generator := rustdoc syntax serialize
123+
TOOL_DEPS_error-index-generator := rustdoc syntax serialize
124124
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
125125
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
126126
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
127127
TOOL_SOURCE_rustbook := $(S)src/rustbook/main.rs
128-
TOOL_SOURCE_error_index_generator := $(S)src/error_index_generator/main.rs
128+
TOOL_SOURCE_error-index-generator := $(S)src/error-index-generator/main.rs
129129

130130
ONLY_RLIB_core := 1
131131
ONLY_RLIB_libc := 1

branches/stable/mk/dist.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ PKG_FILES := \
5252
doc \
5353
driver \
5454
etc \
55-
error_index_generator \
55+
error-index-generator \
5656
$(foreach crate,$(CRATES),lib$(crate)) \
5757
libcollectionstest \
5858
libcoretest \

branches/stable/mk/docs.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ RUSTBOOK_EXE = $(HBIN2_H_$(CFG_BUILD))/rustbook$(X_$(CFG_BUILD))
5959
# ./configure
6060
RUSTBOOK = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(RUSTBOOK_EXE)
6161

62-
# The error_index_generator executable...
63-
ERR_IDX_GEN_EXE = $(HBIN2_H_$(CFG_BUILD))/error_index_generator$(X_$(CFG_BUILD))
62+
# The error-index-generator executable...
63+
ERR_IDX_GEN_EXE = $(HBIN2_H_$(CFG_BUILD))/error-index-generator$(X_$(CFG_BUILD))
6464
ERR_IDX_GEN = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(ERR_IDX_GEN_EXE)
6565
ERR_IDX_GEN_MD = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(ERR_IDX_GEN_EXE) markdown
6666

@@ -221,9 +221,9 @@ error-index: doc/error-index.html
221221
# Metadata used to generate the index is created as a side effect of
222222
# the build so this depends on every crate being up to date.
223223
doc/error-index.html: $(ERR_IDX_GEN_EXE) $(CSREQ$(2)_T_$(CFG_BUILD)_H_$(CFG_BUILD)) | doc/
224-
$(Q)$(call E, error_index_generator: $@)
224+
$(Q)$(call E, error-index-generator: $@)
225225
$(Q)$(ERR_IDX_GEN)
226226

227227
doc/error-index.md: $(ERR_IDX_GEN_EXE) $(CSREQ$(2)_T_$(CFG_BUILD)_H_$(CFG_BUILD)) | doc/
228-
$(Q)$(call E, error_index_generator: $@)
228+
$(Q)$(call E, error-index-generator: $@)
229229
$(Q)$(ERR_IDX_GEN_MD)

branches/stable/mk/prepare.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ define PREPARE_MAN
8282

8383
endef
8484

85-
PREPARE_TOOLS = $(filter-out compiletest rustbook error_index_generator, $(TOOLS))
85+
PREPARE_TOOLS = $(filter-out compiletest rustbook error-index-generator, $(TOOLS))
8686

8787

8888
# $(1) is tool

branches/stable/mk/tests.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,8 +1072,7 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
10721072
$(3) \
10731073
"$$(LLVM_LIBDIR_RUSTFLAGS_$(3))" \
10741074
"$$(LLVM_ALL_COMPONENTS_$(3))" \
1075-
"$$(LLVM_CXXFLAGS_$(3))" \
1076-
'$$(CXX_$(3))'
1075+
"$$(LLVM_CXXFLAGS_$(3))"
10771076
@touch -r $$@.start_time $$@ && rm $$@.start_time
10781077
else
10791078
# FIXME #11094 - The above rule doesn't work right for multiple targets

branches/stable/src/doc/book/vectors.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,15 @@ let v = vec![1, 2, 3, 4, 5]; // v: Vec<i32>
1111
```
1212

1313
(Notice that unlike the `println!` macro we’ve used in the past, we use square
14-
brackets `[]` with `vec!` macro. Rust allows you to use either in either
15-
situation, this is just convention.)
14+
brackets `[]` with `vec!` macro. Rust allows you to use either in either situation,
15+
this is just convention.)
1616

1717
There’s an alternate form of `vec!` for repeating an initial value:
1818

1919
```rust
2020
let v = vec![0; 10]; // ten zeroes
2121
```
2222

23-
Vectors store their contents as contiguous arrays of `T` on the heap. This means
24-
that they must be able to know the size of `T` at compile time (that is, how
25-
many bytes are needed to store a `T`?). The size of some things can't be known
26-
at compile time. For these you'll have to store a pointer to that thing:
27-
thankfully, the [`Box`][box] type works perfectly for this.
28-
2923
## Accessing elements
3024

3125
To get the value at a particular index in the vector, we use `[]`s:
@@ -119,7 +113,6 @@ Vectors have many more useful methods, which you can read about in [their
119113
API documentation][vec].
120114

121115
[vec]: ../std/vec/index.html
122-
[box]: ../std/boxed/index.html
123116
[generic]: generics.html
124117
[panic]: concurrency.html#panics
125118
[get]: http://doc.rust-lang.org/std/vec/struct.Vec.html#method.get

branches/stable/src/etc/maketest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def convert_path_spec(name, value):
5757
putenv('RUSTFLAGS', sys.argv[15])
5858
putenv('LLVM_COMPONENTS', sys.argv[16])
5959
putenv('LLVM_CXXFLAGS', sys.argv[17])
60-
putenv('CXX', sys.argv[18])
6160
putenv('PYTHON', sys.executable)
6261
os.putenv('TARGET', target_triple)
6362

branches/stable/src/etc/tidy.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,6 @@
2424

2525
interesting_files = ['.rs', '.py', '.js', '.sh', '.c', '.h']
2626
uninteresting_files = ['miniz.c', 'jquery', 'rust_android_dummy']
27-
stable_whitelist = {
28-
'src/bootstrap',
29-
'src/build_helper',
30-
'src/libcollectionstest',
31-
'src/libcore',
32-
'src/libstd',
33-
'src/rustc/std_shim',
34-
'src/test'
35-
}
3627

3728

3829
def report_error_name_no(name, no, s):
@@ -102,7 +93,6 @@ def interesting_file(f):
10293
file_counts = {ext: 0 for ext in interesting_files}
10394

10495
all_paths = set()
105-
needs_unstable_attr = set()
10696

10797
try:
10898
for (dirpath, dirnames, filenames) in os.walk(src_dir):
@@ -159,9 +149,6 @@ def interesting_file(f):
159149
else:
160150
if "SNAP " in line:
161151
report_warn("unmatched SNAP line: " + line)
162-
search = re.search(r'^#!\[unstable', line)
163-
if search:
164-
needs_unstable_attr.discard(filename)
165152

166153
if cr_flag in line:
167154
check_cr = False
@@ -194,9 +181,6 @@ def interesting_file(f):
194181
check_cr = True
195182
check_tab = True
196183
check_linelength = True
197-
if all(f not in filename for f in stable_whitelist) and \
198-
re.search(r'src/.*/lib\.rs', filename):
199-
needs_unstable_attr.add(filename)
200184

201185
# Put a reasonable limit on the amount of header data we use for
202186
# the licenseck
@@ -211,8 +195,6 @@ def interesting_file(f):
211195
update_counts(current_name)
212196
assert len(current_contents) > 0
213197
do_license_check(current_name, current_contents)
214-
for f in needs_unstable_attr:
215-
report_error_name_no(f, 1, "requires unstable attribute")
216198

217199
except UnicodeDecodeError as e:
218200
report_err("UTF-8 decoding error " + str(e))

branches/stable/src/libcollections/vec.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! A contiguous growable array type with heap-allocated contents, written
12-
//! `Vec<T>` but pronounced 'vector.'
11+
//! A growable list type with heap-allocated contents, written `Vec<T>` but
12+
//! pronounced 'vector.'
1313
//!
1414
//! Vectors have `O(1)` indexing, amortized `O(1)` push (to the end) and
1515
//! `O(1)` pop (from the end).
@@ -78,7 +78,7 @@ use borrow::{Cow, IntoCow};
7878

7979
use super::range::RangeArgument;
8080

81-
/// A contiguous growable array type, written `Vec<T>` but pronounced 'vector.'
81+
/// A growable list type, written `Vec<T>` but pronounced 'vector.'
8282
///
8383
/// # Examples
8484
///

branches/stable/src/libcore/num/u16.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
1515
#![stable(feature = "rust1", since = "1.0.0")]
1616

17-
uint_module! { u16, 16 }
17+
uint_module! { u16, i16, 16 }

branches/stable/src/libcore/num/u32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
1515
#![stable(feature = "rust1", since = "1.0.0")]
1616

17-
uint_module! { u32, 32 }
17+
uint_module! { u32, i32, 32 }

branches/stable/src/libcore/num/u64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
1515
#![stable(feature = "rust1", since = "1.0.0")]
1616

17-
uint_module! { u64, 64 }
17+
uint_module! { u64, i64, 64 }

branches/stable/src/libcore/num/u8.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
1515
#![stable(feature = "rust1", since = "1.0.0")]
1616

17-
uint_module! { u8, 8 }
17+
uint_module! { u8, i8, 8 }

branches/stable/src/libcore/num/uint_macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#![doc(hidden)]
1212

13-
macro_rules! uint_module { ($T:ty, $bits:expr) => (
13+
macro_rules! uint_module { ($T:ty, $T_SIGNED:ty, $bits:expr) => (
1414

1515
#[unstable(feature = "num_bits_bytes",
1616
reason = "may want to be an associated function",

branches/stable/src/libcore/num/usize.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
#![stable(feature = "rust1", since = "1.0.0")]
1616

1717
#[cfg(target_pointer_width = "32")]
18-
uint_module! { usize, 32 }
18+
uint_module! { usize, isize, 32 }
1919
#[cfg(target_pointer_width = "64")]
20-
uint_module! { usize, 64 }
20+
uint_module! { usize, isize, 64 }

branches/stable/src/librustc/session/config.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ use syntax::attr;
2828
use syntax::attr::AttrMetaMethods;
2929
use syntax::errors::{ColorConfig, Handler};
3030
use syntax::parse;
31-
use syntax::parse::lexer::Reader;
3231
use syntax::parse::token::InternedString;
3332
use syntax::feature_gate::UnstableFeatures;
3433

@@ -907,19 +906,10 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> {
907906
// Convert strings provided as --cfg [cfgspec] into a crate_cfg
908907
pub fn parse_cfgspecs(cfgspecs: Vec<String> ) -> ast::CrateConfig {
909908
cfgspecs.into_iter().map(|s| {
910-
let sess = parse::ParseSess::new();
911-
let mut parser = parse::new_parser_from_source_str(&sess,
912-
Vec::new(),
913-
"cfgspec".to_string(),
914-
s.to_string());
915-
let meta_item = panictry!(parser.parse_meta_item());
916-
917-
if !parser.reader.is_eof() {
918-
early_error(ErrorOutputType::default(), &format!("invalid --cfg argument: {}",
919-
s))
920-
}
921-
922-
meta_item
909+
parse::parse_meta_from_source_str("cfgspec".to_string(),
910+
s.to_string(),
911+
Vec::new(),
912+
&parse::ParseSess::new())
923913
}).collect::<ast::CrateConfig>()
924914
}
925915

branches/stable/src/librustc_driver/pretty.rs

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ use rustc_borrowck::graphviz as borrowck_dot;
3030
use rustc_resolve as resolve;
3131
use rustc_metadata::cstore::CStore;
3232

33-
use rustc_mir::pretty::write_mir_pretty;
34-
3533
use syntax::ast::{self, BlockCheckMode};
3634
use syntax::codemap;
3735
use syntax::fold::{self, Folder};
@@ -79,7 +77,6 @@ pub enum PpMode {
7977
PpmSource(PpSourceMode),
8078
PpmHir(PpSourceMode),
8179
PpmFlowGraph(PpFlowGraphMode),
82-
PpmMir,
8380
}
8481

8582
pub fn parse_pretty(sess: &Session,
@@ -99,15 +96,14 @@ pub fn parse_pretty(sess: &Session,
9996
("hir", true) => PpmHir(PpmNormal),
10097
("hir,identified", true) => PpmHir(PpmIdentified),
10198
("hir,typed", true) => PpmHir(PpmTyped),
102-
("mir", true) => PpmMir,
10399
("flowgraph", true) => PpmFlowGraph(PpFlowGraphMode::Default),
104100
("flowgraph,unlabelled", true) => PpmFlowGraph(PpFlowGraphMode::UnlabelledEdges),
105101
_ => {
106102
if extended {
107103
sess.fatal(&format!("argument to `unpretty` must be one of `normal`, \
108104
`expanded`, `flowgraph[,unlabelled]=<nodeid>`, \
109105
`identified`, `expanded,identified`, `everybody_loops`, \
110-
`hir`, `hir,identified`, `hir,typed`, or `mir`; got {}",
106+
`hir`, `hir,identified`, or `hir,typed`; got {}",
111107
name));
112108
} else {
113109
sess.fatal(&format!("argument to `pretty` must be one of `normal`, `expanded`, \
@@ -573,7 +569,6 @@ fn needs_ast_map(ppm: &PpMode, opt_uii: &Option<UserIdentifiedItem>) -> bool {
573569
PpmSource(PpmExpandedIdentified) |
574570
PpmSource(PpmExpandedHygiene) |
575571
PpmHir(_) |
576-
PpmMir |
577572
PpmFlowGraph(_) => true,
578573
PpmSource(PpmTyped) => panic!("invalid state"),
579574
}
@@ -589,7 +584,6 @@ fn needs_expansion(ppm: &PpMode) -> bool {
589584
PpmSource(PpmExpandedIdentified) |
590585
PpmSource(PpmExpandedHygiene) |
591586
PpmHir(_) |
592-
PpmMir |
593587
PpmFlowGraph(_) => true,
594588
PpmSource(PpmTyped) => panic!("invalid state"),
595589
}
@@ -807,48 +801,6 @@ pub fn pretty_print_input(sess: Session,
807801
})
808802
}
809803

810-
(PpmMir, None) => {
811-
debug!("pretty printing MIR for whole crate");
812-
let ast_map = ast_map.expect("--unpretty mir missing ast_map");
813-
abort_on_err(driver::phase_3_run_analysis_passes(&sess,
814-
&cstore,
815-
ast_map,
816-
&arenas,
817-
&id,
818-
resolve::MakeGlobMap::No,
819-
|tcx, mir_map, _, _| {
820-
let mir_map = mir_map.unwrap();
821-
822-
for (nodeid, mir) in &mir_map.map {
823-
try!(writeln!(out, "MIR for {}", tcx.map.node_to_string(*nodeid)));
824-
try!(write_mir_pretty(mir, &mut out));
825-
}
826-
827-
Ok(())
828-
}), &sess)
829-
}
830-
831-
(PpmMir, Some(uii)) => {
832-
debug!("pretty printing MIR for {:?}", uii);
833-
let ast_map = ast_map.expect("--unpretty mir missing ast_map");
834-
let nodeid = uii.to_one_node_id("--unpretty", &sess, &ast_map);
835-
836-
abort_on_err(driver::phase_3_run_analysis_passes(&sess,
837-
&cstore,
838-
ast_map,
839-
&arenas,
840-
&id,
841-
resolve::MakeGlobMap::No,
842-
|tcx, mir_map, _, _| {
843-
let mir_map = mir_map.unwrap();
844-
try!(writeln!(out, "MIR for {}", tcx.map.node_to_string(nodeid)));
845-
let mir = mir_map.map.get(&nodeid).unwrap_or_else(|| {
846-
sess.fatal(&format!("no MIR map entry for node {}", nodeid))
847-
});
848-
write_mir_pretty(mir, &mut out)
849-
}), &sess)
850-
}
851-
852804
(PpmFlowGraph(mode), opt_uii) => {
853805
debug!("pretty printing flow graph for {:?}", opt_uii);
854806
let uii = opt_uii.unwrap_or_else(|| {

branches/stable/src/librustdoc/html/layout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ r##"<!DOCTYPE html>
122122
123123
<p>
124124
Search functions by type signature (e.g.
125-
<code>vec -> usize</code> or <code>* -> vec</code>)
125+
<code>vec -> usize</code>)
126126
</p>
127127
</div>
128128
</div>

branches/stable/src/librustdoc/html/static/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@
280280
var parts = val.split("->").map(trimmer);
281281
var input = parts[0];
282282
// sort inputs so that order does not matter
283-
var inputs = input.split(",").map(trimmer).sort().toString();
283+
var inputs = input.split(",").map(trimmer).sort();
284284
var output = parts[1];
285285

286286
for (var i = 0; i < nSearchWords; ++i) {
@@ -296,8 +296,8 @@
296296

297297
// allow searching for void (no output) functions as well
298298
var typeOutput = type.output ? type.output.name : "";
299-
if ((inputs === "*" || inputs === typeInputs.toString()) &&
300-
(output === "*" || output == typeOutput)) {
299+
if (inputs.toString() === typeInputs.toString() &&
300+
output == typeOutput) {
301301
results.push({id: i, index: -1, dontValidate: true});
302302
}
303303
}

0 commit comments

Comments
 (0)