Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mini rollup #20760

Merged
merged 33 commits into from
Jan 8, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
78c7faf
Fix: `libc::c_char` is not always `i8`
akosthekiss Jan 8, 2015
1f70acb
Improvements to feature staging
brson Jan 7, 2015
114d2bd
Restore indentation in common.rs
dotdash Jan 8, 2015
0d0869a
Remove the deprecated opt_out_copy feature
flaper87 Jan 8, 2015
0a32010
Add comments to autoderef() helper and refactor it to take
nikomatsakis Jan 7, 2015
2387651
Update the "English-language" to-string function of a `cmt` to use
nikomatsakis Jan 8, 2015
9242549
Fix the actual bug for #20232: when creating the cmt for the implicit
nikomatsakis Jan 8, 2015
9b5fb60
Update regionck to discharge the binder safely (using
nikomatsakis Jan 8, 2015
ba87b54
Add new test for #20232.
nikomatsakis Jan 8, 2015
e957795
Store deprecated status of i/u-suffixed literals.
huonw Jan 8, 2015
d12514b
Add a warning feature gate for int/uint in types and i/u suffixes.
huonw Jan 8, 2015
4f5a57e
Remove warning from the libraries.
huonw Jan 8, 2015
0c70ce1
Update compile fail tests to use isize.
huonw Jan 8, 2015
85f961e
Update compile fail tests to use usize.
huonw Jan 8, 2015
441044f
Update compile-fail tests to use is/us, not i/u.
huonw Jan 8, 2015
dc1ba08
Test fixes.
huonw Jan 8, 2015
2259fe1
Accommodate the "int literal is too large" error message currently em…
pnkfelix Jan 8, 2015
b2e93e2
Update the compile-fail-fulldeps tests with new isize/usize literal s…
pnkfelix Jan 8, 2015
a0f53b0
Update graphviz tests to accommodate new isize/usize types and is/us …
pnkfelix Jan 8, 2015
20744c6
Allow shift operator to take any integral type (and add a test).
nikomatsakis Jan 8, 2015
bf43e83
Modify lifetime-infereence-give-expl-lifetime-param-3 to use a shorter
nikomatsakis Jan 8, 2015
705b92b
Wrap long line
nikomatsakis Jan 8, 2015
a661bd6
Adjust tests to be clearer about the type that results from a shift e…
nikomatsakis Jan 8, 2015
16a6ebd
"The Rust Programming Language"
steveklabnik Dec 2, 2014
cdc75bc
rollup merge of #19897: steveklabnik/trpl
alexcrichton Jan 8, 2015
6a48b18
rollup merge of #20736: akiss77/pr-u8-c_char
alexcrichton Jan 8, 2015
e40f62d
rollup merge of #20738: brson/feature-staging2
alexcrichton Jan 8, 2015
daee409
rollup merge of #20740: FlaPer87/remove-opt-out-copy
alexcrichton Jan 8, 2015
6a09aa2
rollup merge of #20746: dotdash/fix_indent
alexcrichton Jan 8, 2015
8ed88c1
rollup merge of #20751: nikomatsakis/issue-20232
alexcrichton Jan 8, 2015
4281bd1
rollup merge of #20754: nikomatsakis/int-feature
alexcrichton Jan 8, 2015
483fca9
rollup merge of #20757: nikomatsakis/issue-20624-assoc-types-coherence
alexcrichton Jan 8, 2015
7541f82
Fix dead links in the guide and reorganize
alexcrichton Jan 8, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Test fixes.
  • Loading branch information
huonw authored and nikomatsakis committed Jan 8, 2015
commit dc1ba08d1603aeedf37a4a7182e990207891379d
6 changes: 3 additions & 3 deletions src/libsyntax/ext/deriving/rand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ fn rand_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure)
rand_name,
vec!(rng.clone()));

// need to specify the uint-ness of the random number
let uint_ty = cx.ty_ident(trait_span, cx.ident_of("uint"));
// need to specify the usize-ness of the random number
let usize_ty = cx.ty_ident(trait_span, cx.ident_of("usize"));
let value_ident = cx.ident_of("__value");
let let_statement = cx.stmt_let_typed(trait_span,
false,
value_ident,
uint_ty,
usize_ty,
rv_call);

// rand() % variants.len()
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
Some("the `int` type is deprecated; \
use `isize` or a fixed-sized integer")
} else if name == "uint" {
Some("the `unt` type is deprecated; \
Some("the `uint` type is deprecated; \
use `usize` or a fixed-sized integer")
} else {
None
Expand Down
16 changes: 8 additions & 8 deletions src/test/compile-fail/feature-gate-int-uint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
#![allow(dead_code)]

mod u {
type X = usize; //~ WARN the `usize` type is deprecated
type X = uint; //~ WARN the `uint` type is deprecated
struct Foo {
x: usize //~ WARN the `usize` type is deprecated
x: uint //~ WARN the `uint` type is deprecated
}
fn bar(x: usize) { //~ WARN the `usize` type is deprecated
1us; //~ WARN the `u` suffix on integers is deprecated
fn bar(x: uint) { //~ WARN the `uint` type is deprecated
1u; //~ WARN the `u` suffix on integers is deprecated
}
}
mod i {
type X = isize; //~ WARN the `isize` type is deprecated
type X = int; //~ WARN the `int` type is deprecated
struct Foo {
x: isize //~ WARN the `isize` type is deprecated
x: int //~ WARN the `int` type is deprecated
}
fn bar(x: isize) { //~ WARN the `isize` type is deprecated
1is; //~ WARN the `u` suffix on integers is deprecated
fn bar(x: int) { //~ WARN the `int` type is deprecated
1i; //~ WARN the `i` suffix on integers is deprecated
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-13482-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn main() {
let x = [1,2];
let y = match x {
[] => None,
//~^ ERROR types: expected `[_#0is; 2]`, found `[_#7t; 0]`
//~^ ERROR types: expected `[_#0i; 2]`, found `[_#7t; 0]`
// (expected array of 2 elements, found array of 0 elements)
[a,_] => Some(a)
};
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-5544-a.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@

fn main() {
let _i = 18446744073709551616; // 2^64
//~^ ERROR isize literal is too large
//~^ ERROR int literal is too large
}
4 changes: 2 additions & 2 deletions src/test/compile-fail/lex-bad-numeric-literals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ fn main() {
0o; //~ ERROR: no valid digits
1e+; //~ ERROR: expected at least one digit in exponent
0x539.0; //~ ERROR: hexadecimal float literal is not supported
99999999999999999999999999999999; //~ ERROR: isize literal is too large
99999999999999999999999999999999u32; //~ ERROR: isize literal is too large
99999999999999999999999999999999; //~ ERROR: int literal is too large
99999999999999999999999999999999u32; //~ ERROR: int literal is too large
0x; //~ ERROR: no valid digits
0xu32; //~ ERROR: no valid digits
0ou32; //~ ERROR: no valid digits
Expand Down
4 changes: 2 additions & 2 deletions src/test/compile-fail/lint-type-limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ fn qux() {
}

fn quy() {
let i = -23us; //~ WARNING negation of unsigned isize literal may be unintentional
let i = -23us; //~ WARNING negation of unsigned int literal may be unintentional
//~^ WARNING unused variable
}

fn quz() {
let i = 23us;
let j = -i; //~ WARNING negation of unsigned isize variable may be unintentional
let j = -i; //~ WARNING negation of unsigned int variable may be unintentional
//~^ WARNING unused variable
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/oversized-literal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
// except according to those terms.

fn main() {
println!("{}", 18446744073709551616u64); //~ error: isize literal is too large
println!("{}", 18446744073709551616u64); //~ error: int literal is too large
}