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 21 pull requests #35469

Merged
merged 44 commits into from
Aug 7, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2f5294e
Fixes #35304
mikhail-m1 Aug 5, 2016
e7e5cfe
Merge branch 'master' of https://github.com/rust-lang/rust
mikhail-m1 Aug 5, 2016
065c685
Update E0223 to the new format
KiChjang Aug 6, 2016
c9e9d42
Update compiler error 0027 to use new error format.
silenuss Aug 6, 2016
1d25e2e
Update compiler error 0029 to use new error format.
silenuss Aug 6, 2016
eb469d6
Updated E0225 to new format.
razielgn Aug 6, 2016
6eba89e
Fixing compiler error E0121
intrepion Aug 6, 2016
95cce86
Indicate tracking issue for `exact_size_is_empty` unstability.
frewsxcv Aug 6, 2016
19e4579
Updated error message E0282
Aug 5, 2016
e8da915
Fix build on DragonFly (unused function errno_location)
mneumann Aug 6, 2016
0a6b862
Add doc example for `std::ffi::NulError::into_vec`.
frewsxcv Aug 6, 2016
5e06da2
E0131 updated to new format
Aug 6, 2016
02f3609
Update error message for E0243 and E0244
Aug 6, 2016
ac10b5f
Update error E0117 to new format
Detegr Aug 7, 2016
e91f3f6
Update error E0118 to new format
Detegr Aug 7, 2016
54e1e98
Update E0204 to the new error format
munyari Aug 7, 2016
ed72c65
Updates compiler error E0046 with new format
shri3k Aug 5, 2016
b564c6a
Updates compiler error E0040 with new format
shri3k Aug 5, 2016
6487396
Update E0185 and E0186 to new format
Aug 4, 2016
dfb66c3
Update E0010 to use the new format
pcn Aug 6, 2016
da86ae2
Update E0101 and E0102 to new format
franleplant Aug 7, 2016
03dc484
Update E0116 to new error code format.
terrynsun Aug 7, 2016
0b248f1
Update E0205 to the new error format
munyari Aug 7, 2016
f9f6fd4
Rollup merge of #35314 - yossi-k:issue/35277, r=jonathandturner
Aug 7, 2016
0b567c6
Rollup merge of #35355 - shri3k:E0046, r=jonathandturner
Aug 7, 2016
b69b2db
Rollup merge of #35357 - shri3k:E0040, r=jonathandturner
Aug 7, 2016
94cb842
Rollup merge of #35366 - medzin:E0282, r=jonathandturner
Aug 7, 2016
46392c8
Rollup merge of #35394 - mikhail-m1:master, r=jonathandturner
Aug 7, 2016
4df5825
Rollup merge of #35410 - silenuss:e0027-formatting, r=jonathandturner
Aug 7, 2016
7e37442
Rollup merge of #35411 - KiChjang:e0223-new-format, r=jonathandturner
Aug 7, 2016
0297196
Rollup merge of #35413 - silenuss:e0029-formatting, r=jonathandturner
Aug 7, 2016
d4ed060
Rollup merge of #35417 - Limeth:master, r=jonathandturner
Aug 7, 2016
c92ca5f
Rollup merge of #35419 - Keats:err-243, r=jonathandturner
Aug 7, 2016
6bb7f35
Rollup merge of #35421 - razielgn:updated-e0225-to-new-format, r=jona…
Aug 7, 2016
9151431
Rollup merge of #35429 - frewsxcv:tracking-is-empty, r=apasel422
Aug 7, 2016
56ffcbd
Rollup merge of #35433 - mneumann:dragonfly-fix-libstd-errno-location…
Aug 7, 2016
87e129e
Rollup merge of #35434 - intrepion:fix-compile-fail-e0121, r=jonathan…
Aug 7, 2016
3917d0e
Rollup merge of #35436 - frewsxcv:into-vec, r=GuillaumeGomez
Aug 7, 2016
7d9ea8b
Rollup merge of #35439 - pcn:update-E0010-error-message, r=jonathandt…
Aug 7, 2016
a6cf011
Rollup merge of #35443 - franleplant:master, r=jonathandturner
Aug 7, 2016
fe7b3ae
Rollup merge of #35454 - Detegr:master, r=jonathandturner
Aug 7, 2016
cfebba5
Rollup merge of #35455 - munyari:e0204, r=jonathandturner
Aug 7, 2016
8bd8cef
Rollup merge of #35467 - terrynsun:master, r=jonathandturner
Aug 7, 2016
995eeb0
Rollup merge of #35468 - munyari:e0205, r=jonathandturner
Aug 7, 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
Prev Previous commit
Next Next commit
Update E0223 to the new format
  • Loading branch information
KiChjang committed Aug 6, 2016
commit 065c685e80930379ada8c4358cdd69c2c99ebb15
10 changes: 6 additions & 4 deletions src/librustc_typeck/astconv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1211,10 +1211,12 @@ impl<'o, 'gcx: 'tcx, 'tcx> AstConv<'gcx, 'tcx>+'o {
type_str: &str,
trait_str: &str,
name: &str) {
span_err!(self.tcx().sess, span, E0223,
"ambiguous associated type; specify the type using the syntax \
`<{} as {}>::{}`",
type_str, trait_str, name);
struct_span_err!(self.tcx().sess, span, E0223, "ambiguous associated type")
.span_label(span, &format!("ambiguous associated type"))
.note(&format!("specify the type using the syntax `<{} as {}>::{}`",
type_str, trait_str, name))
.emit();

}

// Search for a bound on a type parameter which includes the associated item
Expand Down
5 changes: 4 additions & 1 deletion src/test/compile-fail/E0223.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
trait MyTrait { type X; }

fn main() {
let foo: MyTrait::X; //~ ERROR E0223
let foo: MyTrait::X;
//~^ ERROR ambiguous associated type
//~| NOTE ambiguous associated type
//~| NOTE specify the type using the syntax `<Type as MyTrait>::X`
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,21 @@ trait Get {

fn get<T:Get,U:Get>(x: T, y: U) -> Get::Value {}
//~^ ERROR ambiguous associated type
//~| NOTE ambiguous associated type
//~| NOTE specify the type using the syntax `<Type as Get>::Value`

trait Grab {
type Value;
fn grab(&self) -> Grab::Value;
//~^ ERROR ambiguous associated type
//~| NOTE ambiguous associated type
//~| NOTE specify the type using the syntax `<Type as Grab>::Value`
}

type X = std::ops::Deref::Target;
//~^ ERROR ambiguous associated type
//~| NOTE ambiguous associated type
//~| NOTE specify the type using the syntax `<Type as std::ops::Deref>::Target`

fn main() {
}
4 changes: 3 additions & 1 deletion src/test/compile-fail/issue-34209.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ enum S {
fn bug(l: S) {
match l {
S::B{ } => { },
//~^ ERROR ambiguous associated type; specify the type using the syntax `<S as Trait>::B`
//~^ ERROR ambiguous associated type
//~| NOTE ambiguous associated type
//~| NOTE specify the type using the syntax `<S as Trait>::B`
}
}

Expand Down
8 changes: 6 additions & 2 deletions src/test/compile-fail/qualified-path-params-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ impl S {
fn f<T>() {}
}

type A = <S as Tr>::A::f<u8>; //~ ERROR type parameters are not allowed on this type
//~^ ERROR ambiguous associated type; specify the type using the syntax `<<S as Tr>::A as Trait>::f`
type A = <S as Tr>::A::f<u8>;
//~^ ERROR type parameters are not allowed on this type
//~| NOTE type parameter not allowed
//~| ERROR ambiguous associated type
//~| NOTE ambiguous associated type
//~| NOTE specify the type using the syntax `<<S as Tr>::A as Trait>::f`

fn main() {}
8 changes: 6 additions & 2 deletions src/test/compile-fail/self-impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ impl SuperFoo for Bar {
impl Bar {
fn f() {
let _: <Self>::Baz = true;
//~^ERROR: ambiguous associated type; specify the type using the syntax `<Bar as Trait>::Baz`
//~^ ERROR ambiguous associated type
//~| NOTE ambiguous associated type
//~| NOTE specify the type using the syntax `<Bar as Trait>::Baz`
let _: Self::Baz = true;
//~^ERROR: ambiguous associated type; specify the type using the syntax `<Bar as Trait>::Baz`
//~^ ERROR ambiguous associated type
//~| NOTE ambiguous associated type
//~| NOTE specify the type using the syntax `<Bar as Trait>::Baz`
}
}

Expand Down