-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.T-langRelevant to the language teamRelevant to the language teamfinal-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Milestone
Description
This compiles fine on stable, but fails on nightly and beta:
https://play.rust-lang.org/?gist=9504fbb631c253be8e43bcb872524e0e&version=nightly
#![deny(unused_results)]
fn main() {
let mut p = std::path::PathBuf::from("asdf");
p.set_extension("foo");
}
Nightly results:
Compiling playground v0.0.1 (file:///playground)
error: unused result
--> src/main.rs:5:4
|
5 | p.set_extension("foo");
| ^^^^^^^^^^^^^^^^^^^^^^^
|
note: lint level defined here
--> src/main.rs:1:9
|
1 | #![deny(unused_results)]
| ^^^^^^^^^^^^^^
error: aborting due to previous error
Regardless of whether the change in behavior is an intentional backward compatibility break, it should be documented in the release notes.
See also #43806.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.T-langRelevant to the language teamRelevant to the language teamfinal-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.