]> git.lizzy.rs Git - rust.git/blob - src/docs/builtin_type_shadow.txt
Merge remote-tracking branch 'upstream/master' into rustup
[rust.git] / src / docs / builtin_type_shadow.txt
1 ### What it does
2 Warns if a generic shadows a built-in type.
3
4 ### Why is this bad?
5 This gives surprising type errors.
6
7 ### Example
8
9 ```
10 impl<u32> Foo<u32> {
11     fn impl_func(&self) -> u32 {
12         42
13     }
14 }
15 ```