Skip to content

Commit 96a2531

Browse files
authored
Merge pull request #19826 from lnicola/sync-from-rust
minor: Sync from downstream
2 parents 59ef845 + ac8c057 commit 96a2531

File tree

13 files changed

+53
-28
lines changed

13 files changed

+53
-28
lines changed

Cargo.lock

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" }
8585
vfs = { path = "./crates/vfs", version = "0.0.0" }
8686
edition = { path = "./crates/edition", version = "0.0.0" }
8787

88-
ra-ap-rustc_lexer = { version = "0.110", default-features = false }
89-
ra-ap-rustc_parse_format = { version = "0.110", default-features = false }
90-
ra-ap-rustc_index = { version = "0.110", default-features = false }
91-
ra-ap-rustc_abi = { version = "0.110", default-features = false }
92-
ra-ap-rustc_pattern_analysis = { version = "0.110", default-features = false }
88+
ra-ap-rustc_lexer = { version = "0.113", default-features = false }
89+
ra-ap-rustc_parse_format = { version = "0.113", default-features = false }
90+
ra-ap-rustc_index = { version = "0.113", default-features = false }
91+
ra-ap-rustc_abi = { version = "0.113", default-features = false }
92+
ra-ap-rustc_pattern_analysis = { version = "0.113", default-features = false }
9393

9494
# local crates that aren't published to crates.io. These should not have versions.
9595

@@ -132,7 +132,10 @@ pulldown-cmark-to-cmark = "10.0.4"
132132
pulldown-cmark = { version = "0.9.6", default-features = false }
133133
rayon = "1.10.0"
134134
rowan = "=0.15.15"
135-
salsa = { version = "0.21.1", default-features = false, features = ["rayon","salsa_unstable"] }
135+
salsa = { version = "0.21.1", default-features = false, features = [
136+
"rayon",
137+
"salsa_unstable",
138+
] }
136139
salsa-macros = "0.21.1"
137140
semver = "1.0.26"
138141
serde = { version = "1.0.219" }

crates/hir-def/src/expr_store/lower/asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl ExprCollector<'_> {
224224

225225
curarg = parser.curarg;
226226

227-
let to_span = |inner_span: rustc_parse_format::InnerSpan| {
227+
let to_span = |inner_span: std::ops::Range<usize>| {
228228
is_direct_literal.then(|| {
229229
TextRange::new(
230230
inner_span.start.try_into().unwrap(),

crates/hir-def/src/hir/format_args.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ pub(crate) fn parse(
214214
};
215215
}
216216

217-
let to_span = |inner_span: parse::InnerSpan| {
217+
let to_span = |inner_span: std::ops::Range<usize>| {
218218
is_source_literal.then(|| {
219219
TextRange::new(inner_span.start.try_into().unwrap(), inner_span.end.try_into().unwrap())
220220
})
@@ -297,7 +297,8 @@ pub(crate) fn parse(
297297
unfinished_literal.clear();
298298
}
299299

300-
let span = parser.arg_places.get(placeholder_index).and_then(|&s| to_span(s));
300+
let span =
301+
parser.arg_places.get(placeholder_index).and_then(|s| to_span(s.clone()));
301302
placeholder_index += 1;
302303

303304
let position_span = to_span(position_span);

crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ impl<'db> MatchCheckCtx<'db> {
301301
// ignore this issue.
302302
Ref => PatKind::Deref { subpattern: subpatterns.next().unwrap() },
303303
Slice(_) => unimplemented!(),
304+
DerefPattern(_) => unimplemented!(),
304305
&Str(void) => match void {},
305306
Wildcard | NonExhaustive | Hidden | PrivateUninhabited => PatKind::Wild,
306307
Never => PatKind::Never,
@@ -351,6 +352,7 @@ impl PatCx for MatchCheckCtx<'_> {
351352
},
352353
Ref => 1,
353354
Slice(..) => unimplemented!(),
355+
DerefPattern(..) => unimplemented!(),
354356
Never | Bool(..) | IntRange(..) | F16Range(..) | F32Range(..) | F64Range(..)
355357
| F128Range(..) | Str(..) | Opaque(..) | NonExhaustive | PrivateUninhabited
356358
| Hidden | Missing | Wildcard => 0,
@@ -411,6 +413,7 @@ impl PatCx for MatchCheckCtx<'_> {
411413
}
412414
},
413415
Slice(_) => unreachable!("Found a `Slice` constructor in match checking"),
416+
DerefPattern(_) => unreachable!("Found a `DerefPattern` constructor in match checking"),
414417
Never | Bool(..) | IntRange(..) | F16Range(..) | F32Range(..) | F64Range(..)
415418
| F128Range(..) | Str(..) | Opaque(..) | NonExhaustive | PrivateUninhabited
416419
| Hidden | Missing | Wildcard => {

crates/ide-db/src/generated/lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5789,7 +5789,7 @@ The tracking issue for this feature is: [#120301]
57895789

57905790
------------------------
57915791

5792-
Add the methods `from_mins`, `from_hours` and `from_days` to `Duration`.
5792+
Add the methods `from_days` and `from_weeks` to `Duration`.
57935793
"##,
57945794
default_severity: Severity::Allow,
57955795
warn_since: None,

crates/parser/src/lexed_str.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,18 @@ impl<'a> Converter<'a> {
179179
COMMENT
180180
}
181181

182+
rustc_lexer::TokenKind::Frontmatter {
183+
has_invalid_preceding_whitespace,
184+
invalid_infostring,
185+
} => {
186+
if *has_invalid_preceding_whitespace {
187+
err = "invalid preceding whitespace for frontmatter opening"
188+
} else if *invalid_infostring {
189+
err = "invalid infostring for frontmatter"
190+
}
191+
FRONTMATTER
192+
}
193+
182194
rustc_lexer::TokenKind::Whitespace => WHITESPACE,
183195

184196
rustc_lexer::TokenKind::Ident if token_text == "_" => UNDERSCORE,

0 commit comments

Comments
 (0)