Skip to content

Commit caed20f

Browse files
committed
---
yaml --- r: 211862 b: refs/heads/auto c: b936b1b h: refs/heads/master v: v3
1 parent cd41602 commit caed20f

File tree

12 files changed

+40
-79
lines changed

12 files changed

+40
-79
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: f90aecff7623c651aeafbd3bee7f04efc32a2738
13+
refs/heads/auto: b936b1bd7cd28dd55f5ff4dfd47a808452da2b28
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/configure

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,13 @@ then
849849
putvar CFG_LOCAL_RUST_ROOT
850850
fi
851851

852+
# Force freebsd to build with clang; gcc doesn't like us there
853+
if [ $CFG_OSTYPE = unknown-freebsd ]
854+
then
855+
step_msg "on FreeBSD, forcing use of clang"
856+
CFG_ENABLE_CLANG=1
857+
fi
858+
852859
# Force bitrig to build with clang; gcc doesn't like us there
853860
if [ $CFG_OSTYPE = unknown-bitrig ]
854861
then

branches/auto/mk/docs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ endef
265265
$(foreach crate,$(CRATES),$(eval $(call DEF_LIB_DOC,$(crate))))
266266

267267
COMPILER_DOC_TARGETS := $(CRATES:%=doc/%/index.html)
268-
ifdef CFG_COMPILER_DOCS
268+
ifdef CFG_ENABLE_COMPILER_DOCS
269269
DOC_TARGETS += $(COMPILER_DOC_TARGETS)
270270
else
271271
DOC_TARGETS += $(DOC_CRATES:%=doc/%/index.html)

branches/auto/src/doc/trpl/mutability.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ b.x = 10; // error: cannot assign to immutable field `b.x`
159159

160160
[struct]: structs.html
161161

162-
However, by using [`Cell<T>`][cell], you can emulate field-level mutability:
162+
However, by using `Cell<T>`, you can emulate field-level mutability:
163163

164164
```rust
165165
use std::cell::Cell;
@@ -176,6 +176,4 @@ point.y.set(7);
176176
println!("y: {:?}", point.y);
177177
```
178178

179-
[cell]: ../std/cell/struct.Cell.html
180-
181179
This will print `y: Cell { value: 7 }`. We’ve successfully updated `y`.

branches/auto/src/libcollections/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@
3737
#![feature(unsafe_no_drop_flag, filling_drop)]
3838
#![feature(step_by)]
3939
#![feature(str_char)]
40+
#![feature(str_words)]
4041
#![feature(slice_patterns)]
4142
#![feature(utf8_error)]
42-
#![cfg_attr(test, feature(rand, test))]
43+
#![cfg_attr(test, feature(rand, rustc_private, test, hash, collections,
44+
collections_drain, collections_range))]
4345
#![cfg_attr(test, allow(deprecated))] // rand
44-
#![cfg_attr(not(test), feature(str_words))]
4546

4647
#![feature(no_std)]
4748
#![no_std]

branches/auto/src/libcollections/slice.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@
7979
#![doc(primitive = "slice")]
8080
#![stable(feature = "rust1", since = "1.0.0")]
8181

82-
// Many of the usings in this module are only used in the test configuration.
83-
// It's cleaner to just turn off the unused_imports warning than to fix them.
84-
#![allow(unused_imports)]
85-
8682
use alloc::boxed::Box;
8783
use core::clone::Clone;
8884
use core::cmp::Ordering::{self, Greater, Less};

branches/auto/src/libcollections/str.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@
4747
#![doc(primitive = "str")]
4848
#![stable(feature = "rust1", since = "1.0.0")]
4949

50-
// Many of the usings in this module are only used in the test configuration.
51-
// It's cleaner to just turn off the unused_imports warning than to fix them.
52-
#![allow(unused_imports)]
53-
5450
use self::RecompositionState::*;
5551
use self::DecompositionType::*;
5652

branches/auto/src/libcollections/vec_deque.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1801,7 +1801,7 @@ impl<T: fmt::Debug> fmt::Debug for VecDeque<T> {
18011801

18021802
#[cfg(test)]
18031803
mod tests {
1804-
use core::iter::Iterator;
1804+
use core::iter::{Iterator, self};
18051805
use core::option::Option::Some;
18061806

18071807
use test;

branches/auto/src/libcore/cell.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,6 @@ pub struct UnsafeCell<T: ?Sized> {
795795
///
796796
/// This field should not be accessed directly, it is made public for static
797797
/// initializers.
798-
#[deprecated(since = "1.2.0", reason = "use `get` to access the wrapped \
799-
value or `new` to initialize `UnsafeCell` in statics")]
800798
#[unstable(feature = "core")]
801799
pub value: T,
802800
}
@@ -820,7 +818,6 @@ impl<T> UnsafeCell<T> {
820818
#[stable(feature = "rust1", since = "1.0.0")]
821819
#[inline]
822820
pub const fn new(value: T) -> UnsafeCell<T> {
823-
#![allow(deprecated)]
824821
UnsafeCell { value: value }
825822
}
826823

@@ -842,10 +839,7 @@ impl<T> UnsafeCell<T> {
842839
/// ```
843840
#[inline]
844841
#[stable(feature = "rust1", since = "1.0.0")]
845-
pub unsafe fn into_inner(self) -> T {
846-
#![allow(deprecated)]
847-
self.value
848-
}
842+
pub unsafe fn into_inner(self) -> T { self.value }
849843
}
850844

851845
impl<T: ?Sized> UnsafeCell<T> {
@@ -865,7 +859,6 @@ impl<T: ?Sized> UnsafeCell<T> {
865859
pub fn get(&self) -> *mut T {
866860
// FIXME(#23542) Replace with type ascription.
867861
#![allow(trivial_casts)]
868-
#![allow(deprecated)]
869862
&self.value as *const T as *mut T
870863
}
871864
}

branches/auto/src/librustc/metadata/decoder.rs

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -268,28 +268,10 @@ fn item_trait_ref<'tcx>(doc: rbml::Doc, tcx: &ty::ctxt<'tcx>, cdata: Cmd)
268268
doc_trait_ref(tp, tcx, cdata)
269269
}
270270

271-
struct EnumVariantIds<'a> {
272-
iter: reader::TaggedDocsIterator<'a>,
273-
cdata: Cmd<'a>,
274-
}
275-
276-
impl<'a> Iterator for EnumVariantIds<'a> {
277-
type Item = ast::DefId;
278-
279-
fn next(&mut self) -> Option<ast::DefId> {
280-
self.iter.next().map(|p| translated_def_id(self.cdata, p))
281-
}
282-
283-
fn size_hint(&self) -> (usize, Option<usize>) {
284-
self.iter.size_hint()
285-
}
286-
}
287-
288-
fn enum_variant_ids<'a>(item: rbml::Doc<'a>, cdata: Cmd<'a>) -> EnumVariantIds<'a> {
289-
EnumVariantIds {
290-
iter: reader::tagged_docs(item, tag_items_data_item_variant),
291-
cdata: cdata,
292-
}
271+
fn enum_variant_ids(item: rbml::Doc, cdata: Cmd) -> Vec<ast::DefId> {
272+
reader::tagged_docs(item, tag_items_data_item_variant)
273+
.map(|p| translated_def_id(cdata, p))
274+
.collect()
293275
}
294276

295277
fn item_path(item_doc: rbml::Doc) -> Vec<ast_map::PathElem> {
@@ -737,11 +719,11 @@ pub fn get_enum_variant_defs(intr: &IdentInterner,
737719
let data = cdata.data();
738720
let items = reader::get_doc(rbml::Doc::new(data), tag_items);
739721
let item = find_item(id, items);
740-
enum_variant_ids(item, cdata).map(|did| {
722+
enum_variant_ids(item, cdata).iter().map(|did| {
741723
let item = find_item(did.node, items);
742724
let name = item_name(intr, item);
743725
let visibility = item_visibility(item);
744-
match item_to_def_like(cdata, item, did) {
726+
match item_to_def_like(cdata, item, *did) {
745727
DlDef(def @ def::DefVariant(..)) => (def, name, visibility),
746728
_ => unreachable!()
747729
}
@@ -754,7 +736,7 @@ pub fn get_enum_variants<'tcx>(intr: Rc<IdentInterner>, cdata: Cmd, id: ast::Nod
754736
let items = reader::get_doc(rbml::Doc::new(data), tag_items);
755737
let item = find_item(id, items);
756738
let mut disr_val = 0;
757-
enum_variant_ids(item, cdata).map(|did| {
739+
enum_variant_ids(item, cdata).iter().map(|did| {
758740
let item = find_item(did.node, items);
759741
let ctor_ty = item_type(ast::DefId { krate: cdata.cnum, node: id},
760742
item, tcx, cdata);
@@ -789,7 +771,7 @@ pub fn get_enum_variants<'tcx>(intr: Rc<IdentInterner>, cdata: Cmd, id: ast::Nod
789771
name: name,
790772
// I'm not even sure if we encode visibility
791773
// for variants -- TEST -- tjc
792-
id: did,
774+
id: *did,
793775
disr_val: old_disr_val,
794776
vis: ast::Inherited
795777
})

branches/auto/src/librustc/util/fs.rs

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,14 @@
1111
use std::path::{self, Path, PathBuf};
1212
use std::ffi::OsString;
1313

14-
// Unfortunately, on windows, it looks like msvcrt.dll is silently translating
15-
// verbatim paths under the hood to non-verbatim paths! This manifests itself as
16-
// gcc looking like it cannot accept paths of the form `\\?\C:\...`, but the
17-
// real bug seems to lie in msvcrt.dll.
18-
//
19-
// Verbatim paths are generally pretty rare, but the implementation of
20-
// `fs::canonicalize` currently generates paths of this form, meaning that we're
21-
// going to be passing quite a few of these down to gcc, so we need to deal with
22-
// this case.
14+
// Unfortunately, on windows, gcc cannot accept paths of the form `\\?\C:\...`
15+
// (a verbatim path). This form of path is generally pretty rare, but the
16+
// implementation of `fs::canonicalize` currently generates paths of this form,
17+
// meaning that we're going to be passing quite a few of these down to gcc.
2318
//
2419
// For now we just strip the "verbatim prefix" of `\\?\` from the path. This
2520
// will probably lose information in some cases, but there's not a whole lot
26-
// more we can do with a buggy msvcrt...
27-
//
28-
// For some more information, see this comment:
29-
// https://github.com/rust-lang/rust/issues/25505#issuecomment-102876737
21+
// more we can do with a buggy gcc...
3022
pub fn fix_windows_verbatim_for_gcc(p: &Path) -> PathBuf {
3123
if !cfg!(windows) {
3224
return p.to_path_buf()
@@ -36,20 +28,11 @@ pub fn fix_windows_verbatim_for_gcc(p: &Path) -> PathBuf {
3628
Some(path::Component::Prefix(p)) => p,
3729
_ => return p.to_path_buf(),
3830
};
39-
match prefix.kind() {
40-
path::Prefix::VerbatimDisk(disk) => {
41-
let mut base = OsString::from(format!("{}:", disk as char));
42-
base.push(components.as_path());
43-
PathBuf::from(base)
44-
}
45-
path::Prefix::VerbatimUNC(server, share) => {
46-
let mut base = OsString::from(r"\\");
47-
base.push(server);
48-
base.push(r"\");
49-
base.push(share);
50-
base.push(components.as_path());
51-
PathBuf::from(base)
52-
}
53-
_ => p.to_path_buf(),
54-
}
31+
let disk = match prefix.kind() {
32+
path::Prefix::VerbatimDisk(disk) => disk,
33+
_ => return p.to_path_buf(),
34+
};
35+
let mut base = OsString::from(format!("{}:", disk as char));
36+
base.push(components.as_path());
37+
PathBuf::from(base)
5538
}

branches/auto/src/librustc_back/target/freebsd_base.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ pub fn opts() -> TargetOptions {
1818
executables: true,
1919
morestack: true,
2020
has_rpath: true,
21+
pre_link_args: vec!(
22+
"-L/usr/local/lib".to_string(),
23+
"-L/usr/local/lib/gcc46".to_string(),
24+
"-L/usr/local/lib/gcc44".to_string(),
25+
),
2126

2227
.. Default::default()
2328
}

0 commit comments

Comments
 (0)