-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Balance sidebar
Deref
cycle check with main content
The `Deref` cycle checks added as part of #80653 were "unbalanced" in the sense that the main content code path checks for cycles _before_ descending, while the sidebar checks _after_. Checking _before_ is correct, so this changes the sidebar path to match the main content path.
- Loading branch information
Showing
2 changed files
with
26 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// check-pass | ||
// #81395: Fix ICE when recursing into Deref target only differing in type args | ||
|
||
pub struct Generic<T>(T); | ||
|
||
impl<'a> std::ops::Deref for Generic<&'a mut ()> { | ||
type Target = Generic<&'a ()>; | ||
fn deref(&self) -> &Self::Target { | ||
unimplemented!() | ||
} | ||
} | ||
|
||
impl<'a> Generic<&'a ()> { | ||
pub fn some_method(&self) {} | ||
} |