File tree Expand file tree Collapse file tree 5 files changed +12
-12
lines changed Expand file tree Collapse file tree 5 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ impl<'tcx> LateLintPass<'tcx> for DropTraitConstraints {
96
96
} ;
97
97
let def_id = trait_predicate. trait_ref . def_id ;
98
98
if cx. tcx . lang_items ( ) . drop_trait ( ) == Some ( def_id) {
99
- // Explicitly allow `impl Drop`, a drop-guards-as-Voldemort -type pattern.
99
+ // Explicitly allow `impl Drop`, a drop-guards-as-unnameable -type pattern.
100
100
if trait_predicate. trait_ref . self_ty ( ) . is_impl_trait ( ) {
101
101
continue ;
102
102
}
Original file line number Diff line number Diff line change @@ -4363,7 +4363,7 @@ declare_lint! {
4363
4363
/// pub struct S;
4364
4364
/// }
4365
4365
///
4366
- /// pub fn get_voldemort () -> m::S { m::S }
4366
+ /// pub fn get_unnameable () -> m::S { m::S }
4367
4367
/// # fn main() {}
4368
4368
/// ```
4369
4369
///
Original file line number Diff line number Diff line change @@ -2857,7 +2857,7 @@ impl<'tcx> Ty<'tcx> {
2857
2857
| ty:: Uint ( ..)
2858
2858
| ty:: Float ( ..) => true ,
2859
2859
2860
- // The voldemort ZSTs are fine.
2860
+ // ZST which can't be named are fine.
2861
2861
ty:: FnDef ( ..) => true ,
2862
2862
2863
2863
ty:: Array ( element_ty, _len) => element_ty. is_trivially_pure_clone_copy ( ) ,
Original file line number Diff line number Diff line change 2
2
#![ deny( drop_bounds) ]
3
3
// As a special exemption, `impl Drop` in the return position raises no error.
4
4
// This allows a convenient way to return an unnamed drop guard.
5
- fn voldemort_type ( ) -> impl Drop {
6
- struct Voldemort ;
7
- impl Drop for Voldemort {
5
+ fn unnameable_type ( ) -> impl Drop {
6
+ struct Unnameable ;
7
+ impl Drop for Unnameable {
8
8
fn drop ( & mut self ) { }
9
9
}
10
- Voldemort
10
+ Unnameable
11
11
}
12
12
fn main ( ) {
13
- let _ = voldemort_type ( ) ;
13
+ let _ = unnameable_type ( ) ;
14
14
}
Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ mod m {
20
20
}
21
21
}
22
22
23
- pub trait Voldemort < T > { }
23
+ pub trait Unnameable < T > { }
24
24
25
- impl Voldemort < m:: PubStruct > for i32 { }
26
- impl Voldemort < m:: PubE > for i32 { }
27
- impl < T > Voldemort < T > for u32 where T : m:: PubTr { }
25
+ impl Unnameable < m:: PubStruct > for i32 { }
26
+ impl Unnameable < m:: PubE > for i32 { }
27
+ impl < T > Unnameable < T > for u32 where T : m:: PubTr { }
28
28
29
29
fn main ( ) { }
You can’t perform that action at this time.
0 commit comments