Skip to content

Commit 6b139c5

Browse files
committedOct 3, 2022
Auto merge of rust-lang#102614 - matthiaskrgr:rollup-fjyu7oo, r=matthiaskrgr
Rollup of 3 pull requests Successful merges: - rust-lang#102550 (rustdoc: remove no-op CSS on `.impl, .method` etc) - rust-lang#102591 (Fix duplicate usage of `a` article.) - rust-lang#102592 (Remove a couple lifetimes that can be infered) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents dbaf3e6 + d5fb8d2 commit 6b139c5

File tree

6 files changed

+21
-34
lines changed

6 files changed

+21
-34
lines changed
 

‎compiler/rustc_builtin_macros/src/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ pub fn expand_test_or_bench(
115115
// reworked in the future to not need it, it'd be nice.
116116
_ => diag.struct_span_err(attr_sp, msg).forget_guarantee(),
117117
};
118-
err.span_label(attr_sp, "the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions")
118+
err.span_label(attr_sp, "the `#[test]` macro causes a function to be run on a test and has no effect on non-functions")
119119
.span_label(item.span, format!("expected a non-associated function, found {} {}", item.kind.article(), item.kind.descr()))
120120
.span_suggestion(attr_sp, "replace with conditional compilation to make the item only exist when tests are being run", "#[cfg(test)]", Applicability::MaybeIncorrect)
121121
.emit();

‎compiler/rustc_middle/src/lint.rs

+6-7
Original file line numberDiff line numberDiff line change
@@ -274,29 +274,28 @@ pub fn explain_lint_level_source(
274274
}
275275
}
276276

277-
pub fn struct_lint_level<'s, 'd>(
278-
sess: &'s Session,
277+
pub fn struct_lint_level(
278+
sess: &Session,
279279
lint: &'static Lint,
280280
level: Level,
281281
src: LintLevelSource,
282282
span: Option<MultiSpan>,
283283
msg: impl Into<DiagnosticMessage>,
284-
decorate: impl 'd
285-
+ for<'a, 'b> FnOnce(
284+
decorate: impl for<'a, 'b> FnOnce(
286285
&'b mut DiagnosticBuilder<'a, ()>,
287286
) -> &'b mut DiagnosticBuilder<'a, ()>,
288287
) {
289288
// Avoid codegen bloat from monomorphization by immediately doing dyn dispatch of `decorate` to
290289
// the "real" work.
291-
fn struct_lint_level_impl<'s, 'd>(
292-
sess: &'s Session,
290+
fn struct_lint_level_impl(
291+
sess: &Session,
293292
lint: &'static Lint,
294293
level: Level,
295294
src: LintLevelSource,
296295
span: Option<MultiSpan>,
297296
msg: impl Into<DiagnosticMessage>,
298297
decorate: Box<
299-
dyn 'd
298+
dyn '_
300299
+ for<'a, 'b> FnOnce(
301300
&'b mut DiagnosticBuilder<'a, ()>,
302301
) -> &'b mut DiagnosticBuilder<'a, ()>,

‎src/librustdoc/html/static/css/rustdoc.css

-12
Original file line numberDiff line numberDiff line change
@@ -184,18 +184,6 @@ h4.code-header {
184184
margin: 0;
185185
padding: 0;
186186
}
187-
.impl,
188-
.impl-items .method,
189-
.methods .method,
190-
.impl-items .type,
191-
.methods .type,
192-
.impl-items .associatedconstant,
193-
.methods .associatedconstant,
194-
.impl-items .associatedtype,
195-
.methods .associatedtype {
196-
flex-basis: 100%;
197-
position: relative;
198-
}
199187

200188
#crate-search,
201189
h1, h2, h3, h4, h5, h6,

‎src/test/ui/test-attrs/test-on-not-fn.stderr

+12-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error: the `#[test]` attribute may only be used on a non-associated function
22
--> $DIR/test-on-not-fn.rs:3:1
33
|
44
LL | #[test]
5-
| ^^^^^^^ the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
5+
| ^^^^^^^ the `#[test]` macro causes a function to be run on a test and has no effect on non-functions
66
LL | mod test {}
77
| ----------- expected a non-associated function, found a module
88
|
@@ -15,7 +15,7 @@ error: the `#[test]` attribute may only be used on a non-associated function
1515
--> $DIR/test-on-not-fn.rs:6:1
1616
|
1717
LL | #[test]
18-
| ^^^^^^^ the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
18+
| ^^^^^^^ the `#[test]` macro causes a function to be run on a test and has no effect on non-functions
1919
LL | / mod loooooooooooooong_teeeeeeeeeest {
2020
LL | | /*
2121
LL | | this is a comment
@@ -34,7 +34,7 @@ error: the `#[test]` attribute may only be used on a non-associated function
3434
--> $DIR/test-on-not-fn.rs:20:1
3535
|
3636
LL | #[test]
37-
| ^^^^^^^ the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
37+
| ^^^^^^^ the `#[test]` macro causes a function to be run on a test and has no effect on non-functions
3838
LL | extern "C" {}
3939
| ------------- expected a non-associated function, found an extern block
4040
|
@@ -47,7 +47,7 @@ error: the `#[test]` attribute may only be used on a non-associated function
4747
--> $DIR/test-on-not-fn.rs:23:1
4848
|
4949
LL | #[test]
50-
| ^^^^^^^ the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
50+
| ^^^^^^^ the `#[test]` macro causes a function to be run on a test and has no effect on non-functions
5151
LL | trait Foo {}
5252
| ------------ expected a non-associated function, found a trait
5353
|
@@ -60,7 +60,7 @@ error: the `#[test]` attribute may only be used on a non-associated function
6060
--> $DIR/test-on-not-fn.rs:26:1
6161
|
6262
LL | #[test]
63-
| ^^^^^^^ the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
63+
| ^^^^^^^ the `#[test]` macro causes a function to be run on a test and has no effect on non-functions
6464
LL | impl Foo for i32 {}
6565
| ------------------- expected a non-associated function, found an implementation
6666
|
@@ -73,7 +73,7 @@ error: the `#[test]` attribute may only be used on a non-associated function
7373
--> $DIR/test-on-not-fn.rs:29:1
7474
|
7575
LL | #[test]
76-
| ^^^^^^^ the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
76+
| ^^^^^^^ the `#[test]` macro causes a function to be run on a test and has no effect on non-functions
7777
LL | const FOO: i32 = -1_i32;
7878
| ------------------------ expected a non-associated function, found a constant item
7979
|
@@ -86,7 +86,7 @@ error: the `#[test]` attribute may only be used on a non-associated function
8686
--> $DIR/test-on-not-fn.rs:32:1
8787
|
8888
LL | #[test]
89-
| ^^^^^^^ the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
89+
| ^^^^^^^ the `#[test]` macro causes a function to be run on a test and has no effect on non-functions
9090
LL | static BAR: u64 = 10_000_u64;
9191
| ----------------------------- expected a non-associated function, found a static item
9292
|
@@ -99,7 +99,7 @@ error: the `#[test]` attribute may only be used on a non-associated function
9999
--> $DIR/test-on-not-fn.rs:35:1
100100
|
101101
LL | #[test]
102-
| ^^^^^^^ the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
102+
| ^^^^^^^ the `#[test]` macro causes a function to be run on a test and has no effect on non-functions
103103
LL | / enum MyUnit {
104104
LL | | Unit,
105105
LL | | }
@@ -114,7 +114,7 @@ error: the `#[test]` attribute may only be used on a non-associated function
114114
--> $DIR/test-on-not-fn.rs:40:1
115115
|
116116
LL | #[test]
117-
| ^^^^^^^ the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
117+
| ^^^^^^^ the `#[test]` macro causes a function to be run on a test and has no effect on non-functions
118118
LL | struct NewI32(i32);
119119
| ------------------- expected a non-associated function, found a struct
120120
|
@@ -127,7 +127,7 @@ error: the `#[test]` attribute may only be used on a non-associated function
127127
--> $DIR/test-on-not-fn.rs:43:1
128128
|
129129
LL | #[test]
130-
| ^^^^^^^ the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
130+
| ^^^^^^^ the `#[test]` macro causes a function to be run on a test and has no effect on non-functions
131131
LL | / union Spooky {
132132
LL | | x: i32,
133133
LL | | y: u32,
@@ -143,7 +143,7 @@ error: the `#[test]` attribute may only be used on a non-associated function
143143
--> $DIR/test-on-not-fn.rs:50:1
144144
|
145145
LL | #[test]
146-
| ^^^^^^^ the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
146+
| ^^^^^^^ the `#[test]` macro causes a function to be run on a test and has no effect on non-functions
147147
LL | #[derive(Copy, Clone, Debug)]
148148
LL | / struct MoreAttrs {
149149
LL | | a: i32,
@@ -160,7 +160,7 @@ warning: the `#[test]` attribute may only be used on a non-associated function
160160
--> $DIR/test-on-not-fn.rs:61:1
161161
|
162162
LL | #[test]
163-
| ^^^^^^^ the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
163+
| ^^^^^^^ the `#[test]` macro causes a function to be run on a test and has no effect on non-functions
164164
LL | foo!();
165165
| ------- expected a non-associated function, found an item macro invocation
166166
|

‎src/tools/rust-analyzer/crates/ide-db/src/imports/merge_imports.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ fn path_cmp_short(a: &ast::Path, b: &ast::Path) -> Ordering {
225225
}
226226

227227
/// Compares two paths, if one ends earlier than the other the has_tl parameters decide which is
228-
/// greater as a a path that has a tree list should be greater, while one that just ends without
228+
/// greater as a path that has a tree list should be greater, while one that just ends without
229229
/// a tree list should be considered less.
230230
pub(super) fn use_tree_path_cmp(
231231
a: &ast::Path,

‎src/tools/rust-analyzer/crates/rust-analyzer/src/bin/logger.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ where
132132

133133
let ext = span.extensions();
134134

135-
// `FormattedFields` is a a formatted representation of the span's
135+
// `FormattedFields` is a formatted representation of the span's
136136
// fields, which is stored in its extensions by the `fmt` layer's
137137
// `new_span` method. The fields will have been formatted
138138
// by the same field formatter that's provided to the event

0 commit comments

Comments
 (0)