Skip to content

Commit a3dbef5

Browse files
committed
---
yaml --- r: 190414 b: refs/heads/snap-stage3 c: 1014b22 h: refs/heads/master v: v3
1 parent 34862e0 commit a3dbef5

File tree

12 files changed

+26
-35
lines changed

12 files changed

+26
-35
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 857ac28867722111249b5c3ef68e32499bd11ea0
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 4733190c35a01ac33e82892b4dffa2c052c4fe9c
4+
refs/heads/snap-stage3: 1014b22b317b3afbe211dbc0e1b00045a0e9c76f
55
refs/heads/try: 1c28ab65017d74fc13d003f7c7a73d1a48e5406f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/doc/reference.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3007,10 +3007,6 @@ A type cast expression is denoted with the binary operator `as`.
30073007
Executing an `as` expression casts the value on the left-hand side to the type
30083008
on the right-hand side.
30093009

3010-
A numeric value can be cast to any numeric type. A raw pointer value can be
3011-
cast to or from any integral type or raw pointer type. Any other cast is
3012-
unsupported and will fail to compile.
3013-
30143010
An example of an `as` expression:
30153011

30163012
```

branches/snap-stage3/src/doc/trpl/plugins.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ that implements Roman numeral integer literals.
6363

6464
```ignore
6565
#![crate_type="dylib"]
66-
#![feature(plugin_registrar, rustc_private)]
66+
#![feature(plugin_registrar)]
6767
6868
extern crate syntax;
6969
extern crate rustc;
@@ -92,13 +92,13 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
9292
}
9393
};
9494
95-
let mut text = &*text;
95+
let mut text = &text;
9696
let mut total = 0;
9797
while !text.is_empty() {
9898
match NUMERALS.iter().find(|&&(rn, _)| text.starts_with(rn)) {
9999
Some(&(rn, val)) => {
100100
total += val;
101-
text = &text[rn.len()..];
101+
text = text.slice_from(rn.len());
102102
}
103103
None => {
104104
cx.span_err(sp, "invalid Roman numeral");
@@ -107,7 +107,7 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
107107
}
108108
}
109109
110-
MacEager::expr(cx.expr_u32(sp, total))
110+
MacEager::expr(cx.expr_usize(sp, total))
111111
}
112112
113113
#[plugin_registrar]

branches/snap-stage3/src/libcore/cell.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,9 @@ impl<'b, T> DerefMut for RefMut<'b, T> {
631631
///
632632
/// Types like `Cell<T>` and `RefCell<T>` use this type to wrap their internal data.
633633
///
634+
/// `UnsafeCell<T>` doesn't opt-out from any marker traits, instead, types with an `UnsafeCell<T>`
635+
/// interior are expected to opt-out from those traits themselves.
636+
///
634637
/// # Examples
635638
///
636639
/// ```

branches/snap-stage3/src/libcore/marker.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,14 @@ pub trait Copy : MarkerTrait {
193193
/// the `sync` crate do ensure that any mutation cannot cause data
194194
/// races. Hence these types are `Sync`.
195195
///
196-
/// Any types with interior mutability must also use the `std::cell::UnsafeCell` wrapper around the
197-
/// value(s) which can be mutated when behind a `&` reference; not doing this is undefined
198-
/// behaviour (for example, `transmute`-ing from `&T` to `&mut T` is illegal).
196+
/// Users writing their own types with interior mutability (or anything
197+
/// else that is not thread-safe) should use the `NoSync` marker type
198+
/// (from `std::marker`) to ensure that the compiler doesn't
199+
/// consider the user-defined type to be `Sync`. Any types with
200+
/// interior mutability must also use the `std::cell::UnsafeCell` wrapper
201+
/// around the value(s) which can be mutated when behind a `&`
202+
/// reference; not doing this is undefined behaviour (for example,
203+
/// `transmute`-ing from `&T` to `&mut T` is illegal).
199204
#[stable(feature = "rust1", since = "1.0.0")]
200205
#[lang="sync"]
201206
#[rustc_on_unimplemented = "`{Self}` cannot be shared between threads safely"]

branches/snap-stage3/src/libcore/num/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,7 @@ pub trait FromStrRadix {
15171517
fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::Err>;
15181518
}
15191519

1520-
/// A utility function that just calls `FromStrRadix::from_str_radix`.
1520+
/// A utility function that just calls FromStrRadix::from_str_radix.
15211521
#[unstable(feature = "core", reason = "needs reevaluation")]
15221522
pub fn from_str_radix<T: FromStrRadix>(str: &str, radix: u32)
15231523
-> Result<T, T::Err> {

branches/snap-stage3/src/librustc_driver/driver.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ pub fn build_output_filenames(input: &Input,
927927
// We want to toss everything after the final '.'
928928
let dirpath = match *odir {
929929
Some(ref d) => d.clone(),
930-
None => PathBuf::new("")
930+
None => PathBuf::new(".")
931931
};
932932

933933
// If a crate name is present, we use it as the link name
@@ -954,11 +954,8 @@ pub fn build_output_filenames(input: &Input,
954954
if *odir != None {
955955
sess.warn("ignoring --out-dir flag due to -o flag.");
956956
}
957-
958-
let cur_dir = Path::new("");
959-
960957
OutputFilenames {
961-
out_directory: out_file.parent().unwrap_or(cur_dir).to_path_buf(),
958+
out_directory: out_file.parent().unwrap().to_path_buf(),
962959
out_filestem: out_file.file_stem().unwrap()
963960
.to_str().unwrap().to_string(),
964961
single_output_file: ofile,

branches/snap-stage3/src/test/run-make/bare-outfile/Makefile

Lines changed: 0 additions & 4 deletions
This file was deleted.

branches/snap-stage3/src/test/run-make/bare-outfile/foo.rs

Lines changed: 0 additions & 12 deletions
This file was deleted.

branches/snap-stage3/src/test/run-pass/issue-4759-1.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10+
//
11+
// ignore-lexer-test FIXME #15877
1012

1113
trait U { fn f(self); }
12-
impl U for isize { fn f(self) {} }
14+
impl U for int { fn f(self) {} }
1315
pub fn main() { 4.f(); }

branches/snap-stage3/src/test/run-pass/unsized.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10+
//
11+
// ignore-lexer-test FIXME #15879
1012

1113
// Test syntax checks for `?Sized` syntax.
1214

branches/snap-stage3/src/test/run-pass/unsized2.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10+
//
11+
// ignore-lexer-test FIXME #15879
1012

1113
#![allow(unknown_features)]
1214
#![feature(box_syntax)]

0 commit comments

Comments
 (0)