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

Rollup of 30 pull requests #35666

Merged
merged 67 commits into from
Aug 15, 2016
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
e91b625
Fix typo (privledge->privilege)
Jul 20, 2016
1403df7
Implement From for Cell, RefCell and UnsafeCell
malbarbo Aug 5, 2016
9d6fa40
Add regression test for #22894.
frewsxcv Aug 8, 2016
1a6fac7
E0248 Change in issue format
shyamsundarb-arch Aug 7, 2016
5c2c19a
Update error message for E0253 #35512
lukehinds Aug 9, 2016
5dac93d
[emscripten] Disable jemalloc for emscripten
badboy Aug 6, 2016
ad91873
[emscripten] Ignore tests
badboy Aug 8, 2016
60599df
[emscripten] Disable code paths that don't work on emscripten
badboy Aug 8, 2016
c974749
Update E0253.rs
lukehinds Aug 10, 2016
ae58a87
add -mrelax-relocations=no to i686-musl and i586-gnu
Aug 10, 2016
16cc8a7
Implemented a smarter concatenation system that will hopefully produc…
cgswords Aug 2, 2016
92f7e85
Update E0138 to new format
wdv4758h Aug 10, 2016
4b54dd7
Use an existing constant name as an example.
Antti Aug 11, 2016
c0ff3c1
fix match
Aug 11, 2016
b707a12
Allow compiling against a custom LLVM 3.9 installation
shepmaster Aug 11, 2016
4209f94
Add label to E0254
tvladyslav Aug 10, 2016
045c8c8
std: Optimize panic::catch_unwind slightly
alexcrichton Jul 9, 2016
c99c2ea
doc: a value of type `&str` is called a "string slice"
tshepang Aug 11, 2016
071410b
string: remove needless binding
tshepang Aug 11, 2016
c761184
Fix tidy tests
tvladyslav Aug 11, 2016
d099e30
Introduce `as_slice` method on `std::vec::IntoIter` struct.
frewsxcv Aug 7, 2016
01a766e
Introduce `as_mut_slice` method on `std::vec::IntoIter` struct.
frewsxcv Aug 7, 2016
fc97b5c
Change stabilization version of no_std from 1.0 to 1.6.
Mark-Simulacrum Aug 11, 2016
629f2aa
Fix typo
Aug 11, 2016
4224737
Improve &-ptr printing
Aug 12, 2016
f76a737
Correct span for pub_restricted field
sanxiyn Aug 8, 2016
3042fba
book: fix the hidden find() functions in error-handling.md
cvubrugier Aug 12, 2016
bfca761
fix small typos in std::convert documentation
matthew-piziak Aug 12, 2016
4ab00e4
updated E0070 to new error format
clementmiao Aug 12, 2016
302a423
Update E0301 to the new format
krzysztofgarczynski Aug 12, 2016
5402d28
Update E0302 to the new format
krzysztofgarczynski Aug 13, 2016
08e470f
compiletest: Remove dead code.
ahmedcharles Aug 13, 2016
bd90a16
updated E0067 to new error format
clementmiao Aug 13, 2016
85388f0
E0094 error message updated
theypsilon Aug 13, 2016
6fbff4f
Ensure that attributes are spelled properly.
ahmedcharles Aug 13, 2016
ab00b94
Predicates haven't existed in almost 5 years.
ahmedcharles Aug 13, 2016
10fce6e
Fix a couple of typos in RawVec
IvanUkhov Aug 14, 2016
9d1900b
Rollup merge of #34941 - qolop:patch-2, r=apasel422
eddyb Aug 14, 2016
fa57f35
Rollup merge of #35392 - malbarbo:cell-from, r=brson
eddyb Aug 14, 2016
41e0f2d
Rollup merge of #35444 - alexcrichton:optimize-catch-unwind, r=brson
eddyb Aug 14, 2016
6d8af8c
Rollup merge of #35447 - frewsxcv:vec-into-iter-as-slice, r=alexcrichton
eddyb Aug 14, 2016
c35d8db
Rollup merge of #35491 - sanxiyn:pub-restricted-span, r=nikomatsakis
eddyb Aug 14, 2016
b1ec5b2
Rollup merge of #35533 - frewsxcv:22984, r=brson
eddyb Aug 14, 2016
9fb4fa8
Rollup merge of #35539 - cgswords:ts_concat, r=nrc
eddyb Aug 14, 2016
9c347b9
Rollup merge of #35558 - lukehinds:master, r=nikomatsakis
eddyb Aug 14, 2016
c3cede2
Rollup merge of #35573 - wdv4758h:E0138, r=jonathandturner
eddyb Aug 14, 2016
8ade28e
Rollup merge of #35574 - badboy:emscripten-test-fixes, r=brson
eddyb Aug 14, 2016
da2328b
Rollup merge of #35577 - japaric:relax, r=alexcrichton
eddyb Aug 14, 2016
b65ff08
Rollup merge of #35586 - shyaamsundhar:SqushCom, r=jonathandturner
eddyb Aug 14, 2016
955458e
Rollup merge of #35588 - Antti:fix-atomics-docs, r=alexcrichton
eddyb Aug 14, 2016
e3a94b4
Rollup merge of #35594 - shepmaster:configure-llvm-39, r=alexcrichton
eddyb Aug 14, 2016
812a8c1
Rollup merge of #35596 - crypto-universe:E0254_style_and_tests, r=jon…
eddyb Aug 14, 2016
322aa6e
Rollup merge of #35597 - tshepang:it-is-a-slice, r=steveklabnik
eddyb Aug 14, 2016
b975a12
Rollup merge of #35598 - tshepang:needless-binding, r=steveklabnik
eddyb Aug 14, 2016
7aaa83a
Rollup merge of #35606 - Mark-Simulacrum:no-std-fix, r=brson
eddyb Aug 14, 2016
80510b8
Rollup merge of #35611 - jonathandturner:ptr-helper, r=nikomatsakis
eddyb Aug 14, 2016
c5a9228
Rollup merge of #35615 - clementmiao:E0070_new_error_format, r=jonath…
eddyb Aug 14, 2016
15f66ad
Rollup merge of #35616 - clementmiao:E0067_new_error_format, r=jonath…
eddyb Aug 14, 2016
5766b42
Rollup merge of #35620 - cvubrugier:master, r=Manishearth
eddyb Aug 14, 2016
2294fc4
Rollup merge of #35622 - matthew-piziak:convert-docs-typos, r=apasel422
eddyb Aug 14, 2016
42b3df2
Rollup merge of #35640 - ahmedcharles:dead, r=alexcrichton
eddyb Aug 14, 2016
f91d242
Rollup merge of #35643 - garekkream:update-E0301-new-error-format, r=…
eddyb Aug 14, 2016
50aa568
Rollup merge of #35644 - garekkream:update-E0302-new-error-format, r=…
eddyb Aug 14, 2016
f73f128
Rollup merge of #35646 - theypsilon:master, r=jonathandturner
eddyb Aug 14, 2016
c63adb1
Rollup merge of #35647 - ahmedcharles:spelling, r=alexcrichton
eddyb Aug 14, 2016
43cd345
Rollup merge of #35648 - ahmedcharles:pred, r=alexcrichton
eddyb Aug 14, 2016
bcee2ed
Rollup merge of #35661 - IvanUkhov:raw-vec, r=alexcrichton
eddyb Aug 14, 2016
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
19 changes: 18 additions & 1 deletion src/librustc/ty/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,24 @@ impl<'a, 'gcx, 'lcx, 'tcx> ty::TyS<'tcx> {
ty::TyArray(_, n) => format!("array of {} elements", n),
ty::TySlice(_) => "slice".to_string(),
ty::TyRawPtr(_) => "*-ptr".to_string(),
ty::TyRef(_, _) => "&-ptr".to_string(),
ty::TyRef(region, tymut) => {
let tymut_string = tymut.to_string();
if tymut_string == "_" || //unknown type name,
tymut_string.len() > 10 || //name longer than saying "reference",
region.to_string() != "" //... or a complex type
{
match tymut {
ty::TypeAndMut{mutbl, ..} => {
format!("{}reference", match mutbl {
hir::Mutability::MutMutable => "mutable ",
_ => ""
})
}
}
} else {
format!("&{}", tymut_string)
}
}
ty::TyFnDef(..) => format!("fn item"),
ty::TyFnPtr(_) => "fn pointer".to_string(),
ty::TyTrait(ref inner) => {
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/coercion-slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ fn main() {
//~^ ERROR mismatched types
//~| expected type `&[i32]`
//~| found type `[{integer}; 1]`
//~| expected &-ptr, found array of 1 elements
//~| expected &[i32], found array of 1 elements
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/cross-borrow-trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ pub fn main() {
let _y: &Trait = x; //~ ERROR mismatched types
//~| expected type `&Trait`
//~| found type `Box<Trait>`
//~| expected &-ptr, found box
//~| expected &Trait, found box
}
4 changes: 2 additions & 2 deletions src/test/compile-fail/destructure-trait-ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ fn main() {
//~^ ERROR mismatched types
//~| expected type `T`
//~| found type `&_`
//~| expected trait T, found &-ptr
//~| expected trait T, found reference
let &&&x = &(&1isize as &T);
//~^ ERROR mismatched types
//~| expected type `T`
//~| found type `&_`
//~| expected trait T, found &-ptr
//~| expected trait T, found reference
let box box x = box 1isize as Box<T>;
//~^ ERROR mismatched types
//~| expected type `T`
Expand Down
4 changes: 2 additions & 2 deletions src/test/compile-fail/dst-bad-coercions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ struct Foo<T: ?Sized> {
}

pub fn main() {
// Test that we cannot convert from *-ptr to &-ptr
// Test that we cannot convert from *-ptr to &S and &T
let x: *const S = &S;
let y: &S = x; //~ ERROR mismatched types
let y: &T = x; //~ ERROR mismatched types

// Test that we cannot convert from *-ptr to &-ptr (mut version)
// Test that we cannot convert from *-ptr to &S and &T (mut version)
let x: *mut S = &mut S;
let y: &S = x; //~ ERROR mismatched types
let y: &T = x; //~ ERROR mismatched types
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-12997-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ fn bar(x: isize) { }
//~^ ERROR mismatched types
//~| expected type `fn(&mut __test::test::Bencher)`
//~| found type `fn(isize) {bar}`
//~| expected &-ptr, found isize
//~| expected mutable reference, found isize
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-16338.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ fn main() {
//~^ ERROR mismatched types
//~| expected type `&str`
//~| found type `Slice<_>`
//~| expected &-ptr, found struct `Slice`
//~| expected &str, found struct `Slice`
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-17033.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn f<'r>(p: &'r mut fn(p: &mut ())) {
(*p)(()) //~ ERROR mismatched types
//~| expected type `&mut ()`
//~| found type `()`
//~| expected &-ptr, found ()
//~| expected &mut (), found ()
}

fn main() {}
6 changes: 3 additions & 3 deletions src/test/compile-fail/issue-20225.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ struct Foo;
impl<'a, T> Fn<(&'a T,)> for Foo {
extern "rust-call" fn call(&self, (_,): (T,)) {}
//~^ ERROR: has an incompatible type for trait
//~| expected &-ptr
//~| expected reference
}

impl<'a, T> FnMut<(&'a T,)> for Foo {
extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
//~^ ERROR: has an incompatible type for trait
//~| expected &-ptr
//~| expected reference
}

impl<'a, T> FnOnce<(&'a T,)> for Foo {
type Output = ();

extern "rust-call" fn call_once(self, (_,): (T,)) {}
//~^ ERROR: has an incompatible type for trait
//~| expected &-ptr
//~| expected reference
}

fn main() {}
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-29084.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ macro_rules! foo {
fn bar(d: u8) { }
bar(&mut $d);
//~^ ERROR mismatched types
//~| expected u8, found &-ptr
//~| expected u8, found &mut u8
//~| expected type `u8`
//~| found type `&mut u8`
}}
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-5100.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fn main() {
//~^ ERROR mismatched types
//~| expected type `(bool, bool)`
//~| found type `&_`
//~| expected tuple, found &-ptr
//~| expected tuple, found reference
}


Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-5500.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ fn main() {
//~^ ERROR mismatched types
//~| expected type `()`
//~| found type `&_`
//~| expected (), found &-ptr
//~| expected (), found reference
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-7061.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ impl<'a> BarStruct {
//~^ ERROR mismatched types
//~| expected type `Box<BarStruct>`
//~| found type `&'a mut BarStruct`
//~| expected box, found &-ptr
//~| expected box, found mutable reference
}

fn main() {}
4 changes: 2 additions & 2 deletions src/test/compile-fail/issue-7867.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ fn main() {
//~^ ERROR mismatched types
//~| expected type `&std::option::Option<{integer}>`
//~| found type `std::option::Option<_>`
//~| expected &-ptr, found enum `std::option::Option`
//~| expected reference, found enum `std::option::Option`
None => ()
//~^ ERROR mismatched types
//~| expected type `&std::option::Option<{integer}>`
//~| found type `std::option::Option<_>`
//~| expected &-ptr, found enum `std::option::Option`
//~| expected reference, found enum `std::option::Option`
}
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/method-self-arg-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() {
Foo::bar(x); //~ ERROR mismatched types
//~| expected type `&Foo`
//~| found type `Foo`
//~| expected &-ptr, found struct `Foo`
//~| expected &Foo, found struct `Foo`
Foo::bar(&42); //~ ERROR mismatched types
//~| expected type `&Foo`
//~| found type `&{integer}`
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/overloaded-calls-bad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn main() {
y: 3,
};
let ans = s("what"); //~ ERROR mismatched types
//~^ NOTE expected isize, found &-ptr
//~^ NOTE expected isize, found reference
//~| NOTE expected type
//~| NOTE found type
let ans = s();
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/repeat_count.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fn main() {
//~^ ERROR mismatched types
//~| expected type `usize`
//~| found type `&'static str`
//~| expected usize, found &-ptr
//~| expected usize, found reference
//~| ERROR expected `usize` for repeat count, found string literal [E0306]
//~| expected `usize`
let f = [0; -4_isize];
Expand Down