Don't consider regions in deref_into_dyn_supertrait lint
This commit is contained in:
parent
46ecc10c69
commit
63b34cf480
7 changed files with 104 additions and 11 deletions
|
@ -1,15 +1,13 @@
|
|||
#![deny(deref_into_dyn_supertrait)]
|
||||
|
||||
extern crate core;
|
||||
|
||||
use core::ops::Deref;
|
||||
use std::ops::Deref;
|
||||
|
||||
// issue 89190
|
||||
trait A {}
|
||||
trait B: A {}
|
||||
|
||||
impl<'a> Deref for dyn 'a + B {
|
||||
//~^ ERROR `(dyn B + 'a)` implements `Deref` with supertrait `A` as target
|
||||
//~^ ERROR `dyn B` implements `Deref` with supertrait `A` as target
|
||||
//~| WARN this was previously accepted by the compiler but is being phased out;
|
||||
|
||||
type Target = dyn A;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue