Improve message for raw pointer missing mut and const
"Bare raw pointer" does not exist as a concept.
This commit is contained in:
parent
3d50ad7332
commit
222f47a578
@ -1532,8 +1532,8 @@ impl<'a> Parser<'a> {
|
|||||||
} else {
|
} else {
|
||||||
let span = self.last_span;
|
let span = self.last_span;
|
||||||
self.span_err(span,
|
self.span_err(span,
|
||||||
"bare raw pointers are not allowed, use `*mut T` or \
|
"expected mut or const in raw pointer type (use \
|
||||||
`*const T` as appropriate");
|
`*mut T` or `*const T` as appropriate)");
|
||||||
Mutability::Immutable
|
Mutability::Immutable
|
||||||
};
|
};
|
||||||
let t = self.parse_ty()?;
|
let t = self.parse_ty()?;
|
||||||
|
@ -11,5 +11,5 @@
|
|||||||
// compile-flags: -Z parse-only
|
// compile-flags: -Z parse-only
|
||||||
|
|
||||||
fn foo(_: *()) {
|
fn foo(_: *()) {
|
||||||
//~^ bare raw pointers are not allowed, use `*mut T` or `*const T` as appropriate
|
//~^ expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user