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
2 changed files with 3 additions and 3 deletions
|
|
@ -1532,8 +1532,8 @@ impl<'a> Parser<'a> {
|
|||
} else {
|
||||
let span = self.last_span;
|
||||
self.span_err(span,
|
||||
"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)");
|
||||
Mutability::Immutable
|
||||
};
|
||||
let t = self.parse_ty()?;
|
||||
|
|
|
|||
|
|
@ -11,5 +11,5 @@
|
|||
// compile-flags: -Z parse-only
|
||||
|
||||
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…
Add table
Add a link
Reference in a new issue