forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#111448 - compiler-errors:rustdoc-alias-impl…
…, r=notriddle Use proper impl self type for alias impl in rustdoc We don't want to use `type_of(type_alias)`, we want to use `type_of(impl)` -- this will give us the self type of the impl *properly substituted* in the case that it's an alias. Fixes rust-lang#111420
- Loading branch information
Showing
2 changed files
with
18 additions
and
8 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,9 @@ | ||
pub struct Matrix<T, const N: usize, const M: usize>([[T; N]; M]); | ||
|
||
pub type Vector<T, const N: usize> = Matrix<T, N, 1>; | ||
|
||
// @has "impl_alias_substituted/struct.Matrix.html" '//*[@class="impl"]//h3[@class="code-header"]' \ | ||
// "impl<T: Copy> Matrix<T, 3, 1>" | ||
impl<T: Copy> Vector<T, 3> { | ||
pub fn test() {} | ||
} |