about summary refs log tree commit diff
path: root/src/tools/rust-analyzer
AgeCommit message (Collapse)AuthorLines
2023-12-18Merge commit '21b06c1beb9bb59369ffd652f5d617bcf6952e05' into sync-from-raLaurențiu Nicola-476/+1079
2023-12-17Auto merge of #118830 - GuillaumeGomez:env-tracked_env, r=Nilstriebbors-0/+4
Add support for `--env` on `tracked_env::var` Follow-up of https://github.com/rust-lang/rust/pull/118368. Part of Part of https://github.com/rust-lang/rust/issues/80792. It adds support of the `--env` option for proc-macros through `tracked_env::var`. r? `@Nilstrieb`
2023-12-12Auto merge of #118817 - lnicola:sync-from-ra, r=lnicolabors-6213/+9743
Subtree update of `rust-analyzer` r? `@ghost`
2023-12-12Rollup merge of #118445 - ferrocene:jp-support-reuse-in-submodules, ↵Matthias Krüger-1/+2
r=Mark-Simulacrum Let `reuse` look inside git submodules Changes `collect-license-metadata` and `generate-copyright` so they can now look at the git submodules. Unfortunately `reuse` chokes on the LLVM submodule - it finds the word "Copyright" or the unicode copyright symbol in all kinds of places, including UTF-8 test cases. The `reuse` tool expressly won't let you ignore folders, so we let it scan everything and then strip out the LLVM sub-folder in post. Instead, we add in a hand-curated list of copyright information gleaned by reading the LLVM codebase carefully, which is stored in `.reuse/dep5` in Debian format where `reuse` can find and use it. The `.reuse/dep5` continues to track copyright info for files in the tree that do not have SPDX metadata in them (i.e. all of them)
2023-12-11Auto merge of #118344 - saethlin:rmeta-header-pos, r=WaffleLapkinbors-13/+18
Use a u64 for the rmeta root position Waffle noticed this in https://github.com/rust-lang/rust/pull/117301#discussion_r1405410174 We've upgraded the other file offsets to u64, and this one only costs 4 bytes per file. Also the way the truncation was being done before was extremely easy to miss, I sure missed it! It's not clear to me if not having this change effectively made the other upgrades from u32 to u64 ineffective, but we can have it now. r? `@WaffleLapkin`
2023-12-11Update rust-analyzer to support new `injected_env_var` functionGuillaume Gomez-0/+4
2023-12-11Fix typo in cfgLaurențiu Nicola-1/+1
2023-12-11Merge commit '457b966b171b09a7e57acb710fbca29a4b3526f0' into sync-from-raLaurențiu Nicola-6213/+9743
2023-12-10Apply suggestions from code reviewBen Kimock-7/+7
Co-authored-by: Waffle Maybe <waffle.lapkin@gmail.com>
2023-12-10remove redundant importssurechen-1/+0
detects redundant imports that can be eliminated. for #117772 : In order to facilitate review and modification, split the checking code and removing redundant imports code into two PR.
2023-12-05Rollup merge of #118123 - RalfJung:internal-lib-features, r=compiler-errorsMichael Goulet-1/+1
Add support for making lib features internal We have the notion of an "internal" lang feature: a feature that is never intended to be stabilized, and using which can cause ICEs and other issues without that being considered a bug. This extends that idea to lib features as well. It is an alternative to https://github.com/rust-lang/rust/pull/115623: instead of using an attribute to declare lib features internal, we simply do this based on the name. Everything ending in `_internals` or `_internal` is considered internal. Then we rename `core_intrinsics` to `core_intrinsics_internal`, which fixes https://github.com/rust-lang/rust/issues/115597.
2023-12-04Merge commit 'e402c494b7c7d94a37c6d789a216187aaf9ccd3e' into sync-from-raLaurențiu Nicola-170/+821
2023-12-02Rename `LayoutCalculator::delay_bug` as `LayoutCalculator::delayed_bug`.Nicholas Nethercote-1/+1
To match with the previous commits.
2023-12-02Rename `HandlerInner::delay_span_bug` as `HandlerInner::span_delayed_bug`.Nicholas Nethercote-1/+1
Because the corresponding `Level` is `DelayedBug` and `span_delayed_bug` follows the pattern used everywhere else: `span_err`, `span_warning`, etc.
2023-11-28Use a u64 for the rmeta root positionBen Kimock-8/+13
2023-11-27Merge commit '237712fa314237e428e7ef2ab83b979f928a43a1' into sync-from-raLaurențiu Nicola-308/+1150
2023-11-22also make 'core_intrinsics' internalRalf Jung-1/+1
2023-11-22Put copyright on a line by itself.Jonathan Pallant (Ferrous Systems)-1/+2
2023-11-16Merge commit '141fc695dca1df7cfc3c9803972ec19bb178dcbc' into sync-from-raLaurențiu Nicola-970/+2212
2023-11-14Depend on rustc_driverLaurențiu Nicola-0/+4
2023-11-13Add missing rustc_private featuresLaurențiu Nicola-1/+8
2023-11-08Merge commit '3b7c7f97e4a7bb253a8d398ee4f8346f6cf2817b' into sync-from-raLaurențiu Nicola-2056/+14887
2023-11-04Remove support for compiler plugins.Nicholas Nethercote-18/+0
They've been deprecated for four years. This commit includes the following changes. - It eliminates the `rustc_plugin_impl` crate. - It changes the language used for lints in `compiler/rustc_driver_impl/src/lib.rs` and `compiler/rustc_lint/src/context.rs`. External lints are now called "loaded" lints, rather than "plugins" to avoid confusion with the old plugins. This only has a tiny effect on the output of `-W help`. - E0457 and E0498 are no longer used. - E0463 is narrowed, now only relating to unfound crates, not plugins. - The `plugin` feature was moved from "active" to "removed". - It removes the entire plugins chapter from the unstable book. - It removes quite a few tests, mostly all of those in `tests/ui-fulldeps/plugin/`. Closes #29597.
2023-10-22use visibility to check unused imports and delete some stmtsbohan-3/+1
2023-09-18Merge commit '258b15c506a2d3ad862fd17ae24eaf272443f477' into sync-from-raLaurențiu Nicola-2740/+5763
2023-09-08Rework no_coverage to coverage(off)Andy Caldwell-6/+6
2023-08-22Rollup merge of #115011 - compiler-errors:warn-on-elided-assoc-ct-lt, r=cjgillotMichael Goulet-1/+1
Warn on elided lifetimes in associated constants (`ELIDED_LIFETIMES_IN_ASSOCIATED_CONSTANT`) Elided lifetimes in associated constants (in impls) erroneously resolve to fresh lifetime parameters on the impl since #97313. This is not correct behavior (see #38831). I originally opened #114716 to fix this, but given the time that has passed, the crater results seem pretty bad: https://github.com/rust-lang/rust/pull/114716#issuecomment-1682091952 This PR alternatively implements a lint against this behavior, and I'm hoping to bump this to deny in a few versions.
2023-08-21Fix elided lifetimes in rust-lang/rustMichael Goulet-1/+1
2023-08-21Merge commit '9b3d03408c66749d56466bb09baf2a7177deb6ce' into sync-from-raLaurențiu Nicola-1448/+3862
2023-08-20fix RA buildRalf Jung-1/+1
2023-08-20give some unwind-related terminators a more clear nameRalf Jung-5/+5
2023-08-15update Cargo.lockdirreke-4/+4
2023-08-14Upgrade Object and related depsdirreke-2/+2
2023-08-14fix the wrong number in const KNOWN_ARCHdirreke-1/+1
2023-08-14add a csky-unknown-linux-gnuabiv2 targetDirreke-0/+1
2023-08-08feat: `riscv-interrupt-{m,s}` calling conventionsSeth Pellegrino-0/+2
Similar to prior support added for the mips430, avr, and x86 targets this change implements the rough equivalent of clang's [`__attribute__((interrupt))`][clang-attr] for riscv targets, enabling e.g. ```rust static mut CNT: usize = 0; pub extern "riscv-interrupt-m" fn isr_m() { unsafe { CNT += 1; } } ``` to produce highly effective assembly like: ```asm pub extern "riscv-interrupt-m" fn isr_m() { 420003a0: 1141 addi sp,sp,-16 unsafe { CNT += 1; 420003a2: c62a sw a0,12(sp) 420003a4: c42e sw a1,8(sp) 420003a6: 3fc80537 lui a0,0x3fc80 420003aa: 63c52583 lw a1,1596(a0) # 3fc8063c <_ZN12esp_riscv_rt3CNT17hcec3e3a214887d53E.0> 420003ae: 0585 addi a1,a1,1 420003b0: 62b52e23 sw a1,1596(a0) } } 420003b4: 4532 lw a0,12(sp) 420003b6: 45a2 lw a1,8(sp) 420003b8: 0141 addi sp,sp,16 420003ba: 30200073 mret ``` (disassembly via `riscv64-unknown-elf-objdump -C -S --disassemble ./esp32c3-hal/target/riscv32imc-unknown-none-elf/release/examples/gpio_interrupt`) This outcome is superior to hand-coded interrupt routines which, lacking visibility into any non-assembly body of the interrupt handler, have to be very conservative and save the [entire CPU state to the stack frame][full-frame-save]. By instead asking LLVM to only save the registers that it uses, we defer the decision to the tool with the best context: it can more accurately account for the cost of spills if it knows that every additional register used is already at the cost of an implicit spill. At the LLVM level, this is apparently [implemented by] marking every register as "[callee-save]," matching the semantics of an interrupt handler nicely (it has to leave the CPU state just as it found it after its `{m|s}ret`). This approach is not suitable for every interrupt handler, as it makes no attempt to e.g. save the state in a user-accessible stack frame. For a full discussion of those challenges and tradeoffs, please refer to [the interrupt calling conventions RFC][rfc]. Inside rustc, this implementation differs from prior art because LLVM does not expose the "all-saved" function flavor as a calling convention directly, instead preferring to use an attribute that allows for differentiating between "machine-mode" and "superivsor-mode" interrupts. Finally, some effort has been made to guide those who may not yet be aware of the differences between machine-mode and supervisor-mode interrupts as to why no `riscv-interrupt` calling convention is exposed through rustc, and similarly for why `riscv-interrupt-u` makes no appearance (as it would complicate future LLVM upgrades). [clang-attr]: https://clang.llvm.org/docs/AttributeReference.html#interrupt-risc-v [full-frame-save]: https://github.com/esp-rs/esp-riscv-rt/blob/9281af2ecffe13e40992917316f36920c26acaf3/src/lib.rs#L440-L469 [implemented by]: https://github.com/llvm/llvm-project/blob/b7fb2a3fec7c187d58a6d338ab512d9173bca987/llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp#L61-L67 [callee-save]: https://github.com/llvm/llvm-project/blob/973f1fe7a8591c7af148e573491ab68cc15b6ecf/llvm/lib/Target/RISCV/RISCVCallingConv.td#L30-L37 [rfc]: https://github.com/rust-lang/rfcs/pull/3246
2023-08-07Rollup merge of #114562 - Trolldemorted:thiscall, r=oli-obkMatthias Krüger-16/+0
stabilize abi_thiscall Closes https://github.com/rust-lang/rust/issues/42202, stabilizing the use of the "thiscall" ABI. FCP was substituted by a poll, and the poll has been accepted.
2023-08-07stabilize abi_thiscallBenedikt Radtke-16/+0
2023-08-07Merge commit 'baee6b338b0ea076cd7a9f18d47f175dd2ba0e5d' into sync-from-raLaurențiu Nicola-1042/+4248
2023-07-24Merge commit '99718d0c8bc5aadd993acdcabc1778fc7b5cc572' into sync-from-raLaurențiu Nicola-405/+717
2023-07-17Merge commit '37f84c101bca43b11027f30ab0c2852f9325bc3d' into sync-from-raLaurențiu Nicola-9096/+13686
2023-06-21Remove outdated import in r-a proc macro server.Mara Bos-4/+1
2023-06-20Delete use of proc_macro_span_shrink from proc-macro2David Tolnay-2/+2
2023-06-20Add `Span::{line, column}`Jacob Pratt-0/+10
2023-06-20`Span::{before, after}` → `Span::{start, end}`Jacob Pratt-2/+2
2023-06-20Remove `LineColumn`, `Span::start`, `Span::end`Jacob Pratt-8/+0
2023-06-19Merge commit 'cd3bf9fe51676b520c546460e6d8919b8c8ff99f' into sync-from-raLaurențiu Nicola-1250/+3891
2023-06-05Merge commit 'ed87e0a20a9d196a5ea659ea46ae9574be666d4f' into sync-from-raLaurențiu Nicola-1/+4
2023-06-05Merge commit 'aa9bc8612514d216f84eec218dfd19ab83f3598a' into sync-from-raLaurențiu Nicola-17585/+57666
2023-05-31Remove const eval limit and implement an exponential backoff lint insteadOli Scherer-4/+0