summaryrefslogtreecommitdiffstats
path: root/src/test/ui/parser/recover-ref-dyn-mut.rs
blob: 3016275cc0fd2933bb4000bd4094843af1b6c856 (plain)
1
2
3
4
5
6
7
8
9
// Test that the parser detects `&dyn mut`, offers a help message, and
// recovers.

fn main() {
    let r: &dyn mut Trait;
    //~^ ERROR: `mut` must precede `dyn`
    //~| HELP: place `mut` before `dyn`
    //~| ERROR: cannot find trait `Trait` in this scope [E0405]
}