-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
This was reduced from diff.rs https://github.com/utkarshkukreti/diff.rs
pub fn lines<'a>(left: &'a str) {
iter(left.lines());
}
fn iter<I, T>(left: I)
where
I: Clone + Iterator<Item = T> + DoubleEndedIterator,
T: PartialEq,
{
let _left_count = left.clone().count();
}
RUSTFLAGS="-C passes=lint" cargo build --release
Compiling diff v0.1.11 (file:///tmp/diff.rs)
Unusual: Return statement in function with noreturn attribute
ret void
Finished release [optimized] target(s) in 0.30 secs
The lint warning vanishes when I remove the .count()
.
rustc 1.25.0-nightly (3ec5a99aa 2018-02-14)
binary: rustc
commit-hash: 3ec5a99aaa0084d97a9e845b34fdf03d1462c475
commit-date: 2018-02-14
host: x86_64-unknown-linux-gnu
release: 1.25.0-nightly
LLVM version: 6.0
EDIT: //cc #7463
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.