Auto merge of #15494 - lnicola:sync-from-rust, r=lnicola

minor: Sync from downstream
This commit is contained in:
bors 2023-08-22 07:58:11 +00:00
commit 7f659a3b2f
11 changed files with 24 additions and 30 deletions

View File

@ -86,6 +86,12 @@ jobs:
- name: Test - name: Test
run: cargo test ${{ env.USE_SYSROOT_ABI }} -- --nocapture --quiet run: cargo test ${{ env.USE_SYSROOT_ABI }} -- --nocapture --quiet
- name: Switch to stable toolchain
run: |
rustup update --no-self-update stable
rustup component add --toolchain stable rust-src
rustup default stable
- name: Run analysis-stats on rust-analyzer - name: Run analysis-stats on rust-analyzer
if: matrix.os == 'ubuntu-latest' if: matrix.os == 'ubuntu-latest'
run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats . run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats .

8
Cargo.lock generated
View File

@ -1196,9 +1196,9 @@ dependencies = [
[[package]] [[package]]
name = "object" name = "object"
version = "0.31.1" version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe"
dependencies = [ dependencies = [
"memchr", "memchr",
] ]
@ -1337,7 +1337,7 @@ name = "proc-macro-api"
version = "0.0.0" version = "0.0.0"
dependencies = [ dependencies = [
"memmap2", "memmap2",
"object 0.31.1", "object 0.32.0",
"paths", "paths",
"profile", "profile",
"serde", "serde",
@ -1357,7 +1357,7 @@ dependencies = [
"libloading", "libloading",
"mbe", "mbe",
"memmap2", "memmap2",
"object 0.31.1", "object 0.32.0",
"paths", "paths",
"proc-macro-api", "proc-macro-api",
"proc-macro-test", "proc-macro-test",

View File

@ -368,7 +368,7 @@ pub enum TerminatorKind {
/// ///
/// Only permitted in cleanup blocks. `Resume` is not permitted with `-C unwind=abort` after /// Only permitted in cleanup blocks. `Resume` is not permitted with `-C unwind=abort` after
/// deaggregation runs. /// deaggregation runs.
Resume, UnwindResume,
/// Indicates that the landing pad is finished and that the process should abort. /// Indicates that the landing pad is finished and that the process should abort.
/// ///
@ -1057,7 +1057,7 @@ impl MirBody {
TerminatorKind::FalseEdge { .. } TerminatorKind::FalseEdge { .. }
| TerminatorKind::FalseUnwind { .. } | TerminatorKind::FalseUnwind { .. }
| TerminatorKind::Goto { .. } | TerminatorKind::Goto { .. }
| TerminatorKind::Resume | TerminatorKind::UnwindResume
| TerminatorKind::GeneratorDrop | TerminatorKind::GeneratorDrop
| TerminatorKind::Abort | TerminatorKind::Abort
| TerminatorKind::Return | TerminatorKind::Return

View File

@ -160,7 +160,7 @@ fn moved_out_of_ref(db: &dyn HirDatabase, body: &MirBody) -> Vec<MovedOutOfRef>
TerminatorKind::FalseEdge { .. } TerminatorKind::FalseEdge { .. }
| TerminatorKind::FalseUnwind { .. } | TerminatorKind::FalseUnwind { .. }
| TerminatorKind::Goto { .. } | TerminatorKind::Goto { .. }
| TerminatorKind::Resume | TerminatorKind::UnwindResume
| TerminatorKind::GeneratorDrop | TerminatorKind::GeneratorDrop
| TerminatorKind::Abort | TerminatorKind::Abort
| TerminatorKind::Return | TerminatorKind::Return
@ -280,7 +280,7 @@ fn ever_initialized_map(
let targets = match &terminator.kind { let targets = match &terminator.kind {
TerminatorKind::Goto { target } => vec![*target], TerminatorKind::Goto { target } => vec![*target],
TerminatorKind::SwitchInt { targets, .. } => targets.all_targets().to_vec(), TerminatorKind::SwitchInt { targets, .. } => targets.all_targets().to_vec(),
TerminatorKind::Resume TerminatorKind::UnwindResume
| TerminatorKind::Abort | TerminatorKind::Abort
| TerminatorKind::Return | TerminatorKind::Return
| TerminatorKind::Unreachable => vec![], | TerminatorKind::Unreachable => vec![],
@ -371,7 +371,7 @@ fn mutability_of_locals(
}; };
match &terminator.kind { match &terminator.kind {
TerminatorKind::Goto { .. } TerminatorKind::Goto { .. }
| TerminatorKind::Resume | TerminatorKind::UnwindResume
| TerminatorKind::Abort | TerminatorKind::Abort
| TerminatorKind::Return | TerminatorKind::Return
| TerminatorKind::Unreachable | TerminatorKind::Unreachable

View File

@ -265,7 +265,7 @@ impl Filler<'_> {
self.fill_operand(discr)?; self.fill_operand(discr)?;
} }
TerminatorKind::Goto { .. } TerminatorKind::Goto { .. }
| TerminatorKind::Resume | TerminatorKind::UnwindResume
| TerminatorKind::Abort | TerminatorKind::Abort
| TerminatorKind::Return | TerminatorKind::Return
| TerminatorKind::Unreachable | TerminatorKind::Unreachable

View File

@ -42,10 +42,11 @@ pub(crate) fn complete_cfg(acc: &mut Completions, ctx: &CompletionContext<'_>) {
}; };
} }
const KNOWN_ARCH: [&str; 19] = [ const KNOWN_ARCH: [&str; 20] = [
"aarch64", "aarch64",
"arm", "arm",
"avr", "avr",
"csky",
"hexagon", "hexagon",
"mips", "mips",
"mips64", "mips64",

View File

@ -30,6 +30,8 @@ const SUPPORTED_CALLING_CONVENTIONS: &[&str] = &[
"efiapi", "efiapi",
"avr-interrupt", "avr-interrupt",
"avr-non-blocking-interrupt", "avr-non-blocking-interrupt",
"riscv-interrupt-m",
"riscv-interrupt-s",
"C-cmse-nonsecure-call", "C-cmse-nonsecure-call",
"wasm", "wasm",
"system", "system",

View File

@ -928,22 +928,6 @@ $ cat $(find -name '*.s')
ret; ret;
} }
``` ```
"##,
},
Lint {
label: "abi_thiscall",
description: r##"# `abi_thiscall`
The tracking issue for this feature is: [#42202]
[#42202]: https://github.com/rust-lang/rust/issues/42202
------------------------
The MSVC ABI on x86 Windows uses the `thiscall` calling convention for C++
instance methods by default; it is identical to the usual (C) calling
convention on x86 Windows except that the first parameter of the method,
the `this` pointer, is passed in the ECX register.
"##, "##,
}, },
Lint { Lint {

View File

@ -12,7 +12,7 @@ rust-version.workspace = true
doctest = false doctest = false
[dependencies] [dependencies]
object = { version = "0.31.0", default-features = false, features = [ object = { version = "0.32.0", default-features = false, features = [
"std", "std",
"read_core", "read_core",
"elf", "elf",

View File

@ -12,7 +12,7 @@ rust-version.workspace = true
doctest = false doctest = false
[dependencies] [dependencies]
object = { version = "0.31.0", default-features = false, features = [ object = { version = "0.32.0", default-features = false, features = [
"std", "std",
"read_core", "read_core",
"elf", "elf",

View File

@ -861,6 +861,7 @@ edition = "2021"
bar = {path = "../bar"} bar = {path = "../bar"}
//- /foo/src/main.rs //- /foo/src/main.rs
#![allow(internal_features)]
#![feature(rustc_attrs, decl_macro)] #![feature(rustc_attrs, decl_macro)]
use bar::Bar; use bar::Bar;
@ -938,7 +939,7 @@ pub fn foo(_input: TokenStream) -> TokenStream {
let res = server.send_request::<HoverRequest>(HoverParams { let res = server.send_request::<HoverRequest>(HoverParams {
text_document_position_params: TextDocumentPositionParams::new( text_document_position_params: TextDocumentPositionParams::new(
server.doc_id("foo/src/main.rs"), server.doc_id("foo/src/main.rs"),
Position::new(11, 9), Position::new(12, 9),
), ),
work_done_progress_params: Default::default(), work_done_progress_params: Default::default(),
}); });