Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit46074aa

Browse files
authored
Rollup merge ofrust-lang#126302 - mu001999-contrib:ignore/default, r=michaelwoerister
Detect unused structs which derived Default<!--If this PR is related to an unstable feature or an otherwise tracked effort,please link to the relevant tracking issue here. If you don't know of a relatedtracking issue or there are none, feel free to ignore this.This PR will get automatically assigned to a reviewer. In case you would likea specific user to review your work, you can assign it to them by using r​? <reviewer name>-->Fixesrust-lang#98871
2 parentsa451b2a +5d08a54 commit46074aa

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

‎alloc/src/sync/tests.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ fn show_arc() {
396396

397397
// Make sure deriving works with Arc<T>
398398
#[derive(Eq,Ord,PartialEq,PartialOrd,Clone,Debug,Default)]
399-
structFoo{
399+
struct_Foo{
400400
inner:Arc<i32>,
401401
}
402402

‎core/src/default.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ use crate::ascii::Char as AsciiChar;
103103
/// ```
104104
#[cfg_attr(not(test), rustc_diagnostic_item ="Default")]
105105
#[stable(feature ="rust1", since ="1.0.0")]
106+
#[cfg_attr(not(bootstrap), rustc_trivial_field_reads)]
106107
pubtraitDefault:Sized{
107108
/// Returns the "default value" for a type.
108109
///

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp