add separate errors for out-of-place associated consts and types

Previously, these would both be labeled as methods.
This commit is contained in:
Andrew Paseltiner 2015-07-18 19:56:15 -04:00
parent a27fed7cbd
commit ce856a55f6
3 changed files with 34 additions and 9 deletions

View file

@ -8,9 +8,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_consts)]
trait A { }
impl A for isize {
const BAR: () = (); //~ ERROR const `BAR` is not a member of trait `A`
type Baz = (); //~ ERROR type `Baz` is not a member of trait `A`
fn foo(&self) { } //~ ERROR method `foo` is not a member of trait `A`
}