rust/src
Guillaume Gomez 243dcd0083
Rollup merge of #108188 - jyn514:ra-sysroot, r=albertlarsan68
Change src/etc/vscode_settings.json to always treat ./library as the sysroot source

See
https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/False.20error.20report.20for.20.60rust-analyzer.28private-field.29.60 for further discussion; previously this had various bugs.

I tested go-to-definition on:
- `use std::io::Write` in `src/bootstrap/setup.rs`
- `use std::cell::RefCell` in `src/librustdoc/core.rs`
- `use rustc_span::symbol::sym` in `src/librustdoc/core.rs`
- `use std::fmt` in `compiler/rustc_span/src/symbol.rs`
- `Global` in `library/alloc/src/alloc/tests.rs`

The following things still don't work:
- `Global.deallocate` in alloc/tests.rs. This function is under `cfg(not(test))`, so it can't be enabled without disabling RA in `tests.rs` altogether. I think this might be fixable by moving `library/alloc/src/alloc/tests.rs` to `library/alloc/tests/alloc/lib.rs`, so it's in a different crate, but I'd like to avoid blocking this improvement on that change.

cc `@thomcc` `@BoxyUwU` `@spastorino` - you've had issues with RA in the past, does this fix them? Are there any other use cases I should test? You can try these changes out by running `cp src/etc/vscode_settings.json .vscode/settings.json`, or running `x setup` and picking a random profile (it won't overwrite config.toml if it already exists). See https://github.com/rust-lang/rust/pull/108135 for plans to make updating the config easier.

r? `@Veykril`
2023-02-19 14:47:56 +01:00
..
bootstrap Rollup merge of #108188 - jyn514:ra-sysroot, r=albertlarsan68 2023-02-19 14:47:56 +01:00
ci Rollup merge of #107733 - Kobzol:opt-build-metrics, r=Mark-Simulacrum 2023-02-14 18:24:41 +01:00
doc Auto merge of #99679 - repnop:kernel-address-sanitizer, r=cuviper 2023-02-18 03:05:11 +00:00
etc Change src/etc/vscode_settings.json to always treat ./library as the sysroot source 2023-02-17 15:18:09 -06:00
librustdoc Rollup merge of #108129 - GuillaumeGomez:correctly-handle-links-starting-with-whitespace, r=petrochenkov 2023-02-19 14:47:55 +01:00
llvm-project@477e7285b1 Pull in more LLVM commits 2023-01-20 07:48:59 -08:00
rustdoc-json-types Rustdoc-Json: Report discriminant on all kinds of enum variant. 2023-01-01 19:48:26 +00:00
tools Rollup merge of #108197 - weihanglo:update-cargo, r=weihanglo 2023-02-18 13:26:48 +01:00
README.md Remove stale reference to the test suite location 2023-01-13 11:49:06 +00:00
stage0.json Download rustc component for rustfmt toolchain as well 2023-01-31 10:29:33 -05:00
version Bump to 1.69.0 2023-01-20 18:06:54 -05:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.