### Code ```Rust fn atticus_megatron<T>(xs: &mut [T]) -> usize where T: Copy + Eq, { if xs.len > 2 {} 0 } ``` ### Current output ```Shell error[E0615]: attempted to take value of method `len` on type `&mut [T]` --> lib.rs:294:11 | 294 | if xs.len > 2 {} | ^^^ method, not a field | help: use parentheses to call the method | 294 | if xs.len() > 2 {} | ++ error[E0308]: mismatched types --> lib.rs:294:17 | 290 | fn atticus_megatron<T>(xs: &mut [T]) -> usize | - expected this type parameter ... 294 | if xs.len > 2 {} | ^ expected type parameter `T`, found integer | = note: expected type parameter `T` found type `{integer}` ``` ### Desired output ```Shell Second error message is wrong, rustc doesn't expect `T` and if you pass `T` - it won't work. Skip it? ``` ### Rationale and extra context _No response_ ### Other cases _No response_ ### Rust Version ```Shell rustc 1.76.0 (07dca489a 2024-02-04) binary: rustc commit-hash: 07dca489ac2d933c78d3c5158e3f43beefeb02ce commit-date: 2024-02-04 host: x86_64-unknown-linux-gnu release: 1.76.0 LLVM version: 17.0.6 or most recent nightly as of today ``` ### Anything else? _No response_ <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN_START --> <!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"veera-sivarajan"}$$TRIAGEBOT_ASSIGN_DATA_END --> <!-- TRIAGEBOT_ASSIGN_END --> <!-- TRIAGEBOT_END -->
Activity
veera-sivarajan commentedon Mar 3, 2024
@rustbot claim
Don't Create `ParamCandidate` When Obligation Contains Errors
Don't Create `ParamCandidate` When Obligation Contains Errors
Rollup merge of rust-lang#122360 - veera-sivarajan:bugfix-121941, r=c…
Rollup merge of rust-lang#122360 - veera-sivarajan:bugfix-121941, r=c…
Unrolled build for rust-lang#122360