Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 5 pull requests #122289

Closed
wants to merge 121 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
dba1675
feat: add hover display for trait assoc items
Young-Flash Nov 16, 2023
00358b1
rebase on lastest master
Young-Flash Feb 18, 2024
35ec595
add config item for hover display
Young-Flash Feb 18, 2024
2e87f31
add HoverDisplayConfig
Young-Flash Feb 22, 2024
527be25
unix_sigpipe: Add test for SIGPIPE disposition in child processes
Enselic Feb 24, 2024
ce4ae41
internal: simplify the process of inserting spaces after mut
roife Feb 27, 2024
4896626
fix: use 4 spaces for indentation in macro expansion
roife Feb 27, 2024
ec5236f
test: use 4 spaces for indetation in macro expansion
roife Feb 27, 2024
76b86b2
fix: clippy and format
roife Feb 27, 2024
6112ddf
Add prefix `file_` to `Semantics`'s `to_module_defs()`/`to_module_def…
regexident Feb 28, 2024
fac8a14
Add a more methods for resolving definitions from AST to their corres…
regexident Feb 28, 2024
03b02e6
internal: Move ide-assists codegen tests into an xtask codegen command
Veykril Feb 28, 2024
a01e4f8
Add basic support for Native Debug
lnicola Feb 29, 2024
06a883e
Take a reference instead of cloning
mo8it Feb 29, 2024
748f57c
Only clone when required
mo8it Feb 29, 2024
4aab2d5
Remove unneeded to_owned
mo8it Feb 29, 2024
9df73c6
Convert directly into an Arc<str>
mo8it Feb 29, 2024
00a049b
Avoid cloning deps
mo8it Feb 29, 2024
1d28aec
fix: autocomplete constants inside format strings
norskeld Feb 29, 2024
dba67b4
update for review
Young-Flash Mar 2, 2024
7c6f7b2
Update rustc_pattern_analysis
Nadrieril Mar 2, 2024
67f7557
Auto merge of #16738 - Nadrieril:update-pat-ana, r=lnicola
bors Mar 3, 2024
9fafbfa
Merge branch 'master' into sync-from-rust
lnicola Mar 3, 2024
037924c
Auto merge of #16740 - lnicola:sync-from-rust, r=lnicola
bors Mar 3, 2024
d444acd
Auto merge of #16719 - lnicola:native-debug, r=lnicola
bors Mar 4, 2024
518cfe8
Auto merge of #16723 - norskeld:constants-autocomplete, r=Veykril
bors Mar 4, 2024
0b7d4cc
Auto merge of #16690 - roife:fix-issue-16471, r=Veykril
bors Mar 4, 2024
d8feb90
Auto merge of #16703 - regexident:sema-ast-to-hir, r=Veykril
bors Mar 4, 2024
2074cc2
Auto merge of #16722 - mo8it:allocations, r=Veykril
bors Mar 4, 2024
4303e74
Cleanup
Veykril Mar 4, 2024
99a1b8f
Auto merge of #16747 - Veykril:cleanup, r=Veykril
bors Mar 4, 2024
c3c9f5f
internal: Compute syntax validation errors on demand
Veykril Mar 4, 2024
a7e9f12
Auto merge of #16748 - Veykril:on-demand-validation-err, r=Veykril
bors Mar 4, 2024
6e802a0
minor: Mark remove_unnecessary_else as experimental
Veykril Mar 4, 2024
00879b1
Auto merge of #16750 - Veykril:unnecessary-else, r=Veykril
bors Mar 4, 2024
4e8cbf3
Auto merge of #16708 - Veykril:codegen, r=Veykril
bors Mar 4, 2024
0964374
Move diagnostics docs generation into xtask/codegen
Veykril Mar 4, 2024
76463ee
Move lint definition generation into xtask/codegen
Veykril Mar 4, 2024
b9dbb8a
Regenerate lints table
Veykril Mar 4, 2024
9f14343
Auto merge of #16751 - Veykril:codegen, r=Veykril
bors Mar 4, 2024
ac641a1
Bump mio from 0.8.5 to 0.8.11
dependabot[bot] Mar 4, 2024
2a4ba42
fix: hide destructure_struct_binding assist if no public fields
Lindronics Mar 4, 2024
58e10c7
Auto merge of #16753 - rust-lang:dependabot/cargo/mio-0.8.11, r=lnicola
bors Mar 5, 2024
0c2e9fe
Auto merge of #16752 - Lindronics:destructure-struct-binding, r=Veykril
bors Mar 5, 2024
ce3216e
Auto merge of #15938 - Young-Flash:display_trait_item_when_hover, r=V…
bors Mar 5, 2024
fe0daa7
Revert "prioritise rustup sysroots over system ones"
Veykril Mar 5, 2024
c310aee
For toolchain binaries ue the full path found in $PATH
Veykril Mar 5, 2024
6b48133
Prefer cargo proxies when setting RUSTUP_TOOLCHAIN
Veykril Mar 5, 2024
b20e467
internal: Adjust a few things for trait assoc item hovers
Veykril Mar 5, 2024
124d5ff
Auto merge of #16756 - Veykril:hover-trait, r=Veykril
bors Mar 5, 2024
8844640
fix: Put style lints behind disabled-by-default config
Veykril Mar 5, 2024
676455f
Auto merge of #16757 - Veykril:style-lints, r=Veykril
bors Mar 5, 2024
00a6cc0
Update Cargo.lock
Veykril Mar 5, 2024
2898c42
Auto merge of #16758 - Veykril:cargo-lock, r=Veykril
bors Mar 5, 2024
ece18fe
fix: resolve sub-patterns inside range pattern
roife Mar 5, 2024
96a7c6a
fix: mir for range pattern
roife Mar 5, 2024
16995ce
test: add tests for constants inside range pattern
roife Mar 5, 2024
9cc3a9c
fix: formatting
roife Mar 5, 2024
b06726b
remove `ignore-hidden = false`
Young-Flash Mar 5, 2024
7c786ed
Auto merge of #16761 - Young-Flash:ignore_hidden, r=Veykril
bors Mar 5, 2024
223238d
Auto merge of #16759 - roife:fix-goto-def-for-constants-in-range-patt…
bors Mar 5, 2024
1afeea8
Add `fn parent_fn()` accessors for `hir::Param` & `hir::SelfParam`
regexident Mar 5, 2024
bf14131
Add `fn index()` accessor for `hir::Param`
regexident Mar 5, 2024
9169144
Auto merge of #16763 - regexident:param-accessors, r=Veykril
bors Mar 5, 2024
44be243
Add test explorer
HKalbasi Mar 1, 2024
767d5d3
Auto merge of #16662 - HKalbasi:test-explorer, r=HKalbasi
bors Mar 5, 2024
faea7fc
fix: keep attrs for assist 'generate_delegate_trait'
roife Mar 6, 2024
5c9ce7b
test: add tests for keeping attrs in assist 'generate_delegate_trait'
roife Mar 6, 2024
52d8ae7
Auto merge of #16766 - roife:fix-issue-15198, r=Veykril
bors Mar 6, 2024
a8f5611
fix: Function argument type inference with associated type impl trait
ShoyuVanilla Mar 6, 2024
1a55ab3
Auto merge of #16769 - ShoyuVanilla:issue-15412, r=Veykril
bors Mar 6, 2024
b85d38f
Auto merge of #16755 - Veykril:rustup-bins, r=Veykril
bors Mar 6, 2024
03420c3
fix: panic when split float numbers in scientific notation
roife Mar 6, 2024
e2daee6
test: add test for float_split_scientific_notation
roife Mar 6, 2024
91d181f
minor: fmt and clippy
roife Mar 6, 2024
e5889c9
Auto merge of #16770 - roife:fix-issue-16278, r=Veykril
bors Mar 6, 2024
1c6d1b4
fix: Add config and capability for test explorer
Veykril Mar 6, 2024
ce15e73
Auto merge of #16773 - Veykril:text-explorer, r=Veykril
bors Mar 6, 2024
a15cc86
Implement parent-child relation for `SourceRoot`s
alibektas Feb 26, 2024
9c50d12
Opt for FxHashMap<Id,Id> instead of <Id,Option<Id>> and apply request…
alibektas Mar 4, 2024
a3b6e89
Add tracing spans to macro generated database
Veykril Mar 6, 2024
09d33f3
Add diagnostics integrated benchmark
Veykril Mar 7, 2024
9c2fa76
Dedup hprof stuff
Veykril Mar 7, 2024
bd0ffb0
Remove accidental dependency between `parse_macro_expansion` and `parse`
Veykril Mar 7, 2024
00f6a7a
Auto merge of #16772 - Veykril:salsa-tracing, r=Veykril
bors Mar 7, 2024
a1fda64
Auto merge of #16742 - alibektas:13529/source_root_tree, r=Veykril
bors Mar 7, 2024
0ffc1ef
Auto merge of #16775 - Veykril:parse-macro-parse, r=Veykril
bors Mar 7, 2024
c04c0dd
fix: Don't force draw a dependency edge to the real_span_map query
Veykril Mar 7, 2024
e101f24
Auto merge of #16776 - Veykril:parse-macro-parse, r=Veykril
bors Mar 7, 2024
09b9a92
fix: Don't invalid body query results when generating desugared names
Veykril Mar 7, 2024
b1f6d56
Auto merge of #16777 - Veykril:body-invalid, r=Veykril
bors Mar 7, 2024
1b0b422
Update `rustc_pattern_analysis` to 0.42.0
Nadrieril Mar 7, 2024
e31484c
Update the other crates too
Nadrieril Mar 7, 2024
bbb441e
Auto merge of #16778 - Nadrieril:update-pat-ana, r=lnicola
bors Mar 7, 2024
cd2347e
Skip match diagnostics for partially unknown types
lnicola Mar 7, 2024
7f19beb
Auto merge of #16779 - lnicola:skip-unknown-types-match-diagnostics, …
bors Mar 7, 2024
1f37e5a
fix: Don't escape `\` and `$` in "Extract format expressions" assist
DropDemBits Mar 5, 2024
48cb059
Auto merge of #16781 - DropDemBits:extract-format-args-escaping, r=Ve…
bors Mar 7, 2024
7dadc64
minor: Update comments in `format_string_exprs`
DropDemBits Mar 7, 2024
bc38183
fix: Preserve `$` and `\` in postfix format completions
DropDemBits Mar 7, 2024
00a0125
Auto merge of #16782 - DropDemBits:format-string-exprs-comments, r=Ve…
bors Mar 8, 2024
b37ccfc
Remove unused keyword from visibility recovery
pksunkara Mar 7, 2024
2a41b2c
Improve readability of the parser code
pksunkara Mar 6, 2024
a838e44
Remove unncessary check for macro call
pksunkara Mar 6, 2024
1487bc2
Auto merge of #16785 - pksunkara:remove-crate-visibility-recovery, r=…
bors Mar 8, 2024
2b7b44b
Auto merge of #16786 - pksunkara:improve-readability, r=lnicola
bors Mar 8, 2024
2397e7a
Auto merge of #16787 - pksunkara:remove-macro-call-check, r=lnicola
bors Mar 8, 2024
0b55b01
ensure that sysroot is properly set for cross-targets
onur-ozkan Mar 8, 2024
dc99ad9
Some minor changes in the test explorer lsp extension
HKalbasi Mar 8, 2024
79508d9
remove unused struct Snap in lsif
mu001999 Mar 9, 2024
8f08bbe
Auto merge of #16795 - mu001999:master, r=Veykril
bors Mar 9, 2024
574e23e
Auto merge of #16794 - HKalbasi:test-explorer, r=lnicola
bors Mar 9, 2024
93a807f
[bootstrap] Move the split-debuginfo setting to the per-target section
TimNN Feb 28, 2024
047e17d
mir-opt tests: don't run a different set on --bless; enable --keep-st…
Nadrieril Mar 9, 2024
56493e4
Merge commit '574e23ec508064613783cba3d1833a95fd9a5080' into sync-fro…
lnicola Mar 10, 2024
b4e3b2e
Bring back in-rust-tree feature to ide
lnicola Mar 10, 2024
620607d
Rollup merge of #121573 - Enselic:sigpipe-child-process, r=Mark-Simul…
matthiaskrgr Mar 10, 2024
fa14b60
Rollup merge of #121754 - TimNN:split-target, r=Mark-Simulacrum
matthiaskrgr Mar 10, 2024
513ec6c
Rollup merge of #122205 - onur-ozkan:incorrect-sysroot-for-target, r=…
matthiaskrgr Mar 10, 2024
82779e2
Rollup merge of #122257 - Nadrieril:tweak-mir-opt-tests, r=clubby789
matthiaskrgr Mar 10, 2024
3aa6594
Rollup merge of #122272 - lnicola:sync-from-ra, r=lnicola
matthiaskrgr Mar 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 26 additions & 14 deletions config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -543,23 +543,15 @@
# FIXME(#61117): Some tests fail when this option is enabled.
#debuginfo-level-tests = 0

# Should rustc be build with split debuginfo? Default is platform dependent.
# Valid values are the same as those accepted by `-C split-debuginfo`
# (`off`/`unpacked`/`packed`).
# Should rustc and the standard library be built with split debuginfo? Default
# is platform dependent.
#
# On Linux, split debuginfo is disabled by default.
# This field is deprecated, use `target.<triple>.split-debuginfo` instead.
#
# On Apple platforms, unpacked split debuginfo is used by default. Unpacked
# debuginfo does not run `dsymutil`, which packages debuginfo from disparate
# object files into a single `.dSYM` file. `dsymutil` adds time to builds for
# no clear benefit, and also makes it more difficult for debuggers to find
# debug info. The compiler currently defaults to running `dsymutil` to preserve
# its historical default, but when compiling the compiler itself, we skip it by
# default since we know it's safe to do so in that case.
# The value specified here is only used when targeting the `build.build` triple,
# and is overridden by `target.<triple>.split-debuginfo` if specified.
#
# On Windows platforms, packed debuginfo is the only supported option,
# producing a `.pdb` file.
#split-debuginfo = if linux { off } else if windows { packed } else if apple { unpacked }
#split-debuginfo = see target.<triple>.split-debuginfo

# Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
#backtrace = true
Expand Down Expand Up @@ -769,6 +761,26 @@
# Setting this will override the `use-lld` option for Rust code when targeting MSVC.
#linker = "cc" (path)

# Should rustc and the standard library be built with split debuginfo? Default
# is platform dependent.
#
# Valid values are the same as those accepted by `-C split-debuginfo`
# (`off`/`unpacked`/`packed`).
#
# On Linux, split debuginfo is disabled by default.
#
# On Apple platforms, unpacked split debuginfo is used by default. Unpacked
# debuginfo does not run `dsymutil`, which packages debuginfo from disparate
# object files into a single `.dSYM` file. `dsymutil` adds time to builds for
# no clear benefit, and also makes it more difficult for debuggers to find
# debug info. The compiler currently defaults to running `dsymutil` to preserve
# its historical default, but when compiling the compiler itself, we skip it by
# default since we know it's safe to do so in that case.
#
# On Windows platforms, packed debuginfo is the only supported option,
# producing a `.pdb` file.
#split-debuginfo = if linux { off } else if windows { packed } else if apple { unpacked }

# Path to the `llvm-config` binary of the installation of a custom LLVM to link
# against. Note that if this is specified we don't compile LLVM at all for this
# target.
Expand Down
9 changes: 8 additions & 1 deletion src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,7 @@ impl Step for MirOpt {
})
};

if builder.config.cmd.bless() {
if builder.config.keep_stage_std.is_empty() {
// All that we really need to do is cover all combinations of 32/64-bit and unwind/abort,
// but while we're at it we might as well flex our cross-compilation support. This
// selection covers all our tier 1 operating systems and architectures using only tier
Expand All @@ -1568,6 +1568,7 @@ impl Step for MirOpt {
run(panic_abort_target);
}
} else {
// If we're keeping a std stage, only run tests for this target.
run(self.target);
}
}
Expand Down Expand Up @@ -2573,6 +2574,12 @@ impl Step for Crate {
// we're working with automatically.
let compiler = builder.compiler_for(compiler.stage, compiler.host, target);

// During cross compilations, sysroot for the target may not be available.
// Ensure that it is prepared.
if builder.config.build != target {
builder.ensure(compile::Rustc::new(compiler, target));
}

let mut cargo = builder::Cargo::new(
builder,
compiler,
Expand Down
7 changes: 4 additions & 3 deletions src/bootstrap/src/core/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1730,15 +1730,16 @@ impl<'a> Builder<'a> {
},
);

let split_debuginfo = self.config.split_debuginfo(target);
let split_debuginfo_is_stable = target.contains("linux")
|| target.contains("apple")
|| (target.is_msvc() && self.config.rust_split_debuginfo == SplitDebuginfo::Packed)
|| (target.is_windows() && self.config.rust_split_debuginfo == SplitDebuginfo::Off);
|| (target.is_msvc() && split_debuginfo == SplitDebuginfo::Packed)
|| (target.is_windows() && split_debuginfo == SplitDebuginfo::Off);

if !split_debuginfo_is_stable {
rustflags.arg("-Zunstable-options");
}
match self.config.rust_split_debuginfo {
match split_debuginfo {
SplitDebuginfo::Packed => rustflags.arg("-Csplit-debuginfo=packed"),
SplitDebuginfo::Unpacked => rustflags.arg("-Csplit-debuginfo=unpacked"),
SplitDebuginfo::Off => rustflags.arg("-Csplit-debuginfo=off"),
Expand Down
42 changes: 34 additions & 8 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ pub struct Config {
pub rust_debuginfo_level_std: DebuginfoLevel,
pub rust_debuginfo_level_tools: DebuginfoLevel,
pub rust_debuginfo_level_tests: DebuginfoLevel,
pub rust_split_debuginfo: SplitDebuginfo,
pub rust_split_debuginfo_for_build_triple: Option<SplitDebuginfo>, // FIXME: Deprecated field. Remove in Q3'24.
pub rust_rpath: bool,
pub rust_strip: bool,
pub rust_frame_pointers: bool,
Expand Down Expand Up @@ -571,6 +571,7 @@ pub struct Target {
pub ranlib: Option<PathBuf>,
pub default_linker: Option<PathBuf>,
pub linker: Option<PathBuf>,
pub split_debuginfo: Option<SplitDebuginfo>,
pub sanitizers: Option<bool>,
pub profiler: Option<StringOrBool>,
pub rpath: Option<bool>,
Expand Down Expand Up @@ -1128,6 +1129,7 @@ define_config! {
ranlib: Option<String> = "ranlib",
default_linker: Option<PathBuf> = "default-linker",
linker: Option<String> = "linker",
split_debuginfo: Option<String> = "split-debuginfo",
llvm_config: Option<String> = "llvm-config",
llvm_has_rust_patches: Option<bool> = "llvm-has-rust-patches",
llvm_filecheck: Option<String> = "llvm-filecheck",
Expand Down Expand Up @@ -1620,11 +1622,18 @@ impl Config {
debuginfo_level_tools = debuginfo_level_tools_toml;
debuginfo_level_tests = debuginfo_level_tests_toml;

config.rust_split_debuginfo = split_debuginfo
config.rust_split_debuginfo_for_build_triple = split_debuginfo
.as_deref()
.map(SplitDebuginfo::from_str)
.map(|v| v.expect("invalid value for rust.split_debuginfo"))
.unwrap_or(SplitDebuginfo::default_for_platform(config.build));
.map(|v| v.expect("invalid value for rust.split-debuginfo"));

if config.rust_split_debuginfo_for_build_triple.is_some() {
println!(
"WARNING: specifying `rust.split-debuginfo` is deprecated, use `target.{}.split-debuginfo` instead",
config.build
);
}

optimize = optimize_toml;
omit_git_hash = omit_git_hash_toml;
config.rust_new_symbol_mangling = new_symbol_mangling;
Expand Down Expand Up @@ -1845,10 +1854,11 @@ impl Config {
if let Some(ref s) = cfg.llvm_filecheck {
target.llvm_filecheck = Some(config.src.join(s));
}
target.llvm_libunwind = cfg
.llvm_libunwind
.as_ref()
.map(|v| v.parse().expect("failed to parse rust.llvm-libunwind"));
target.llvm_libunwind = cfg.llvm_libunwind.as_ref().map(|v| {
v.parse().unwrap_or_else(|_| {
panic!("failed to parse target.{triple}.llvm-libunwind")
})
});
if let Some(s) = cfg.no_std {
target.no_std = s;
}
Expand Down Expand Up @@ -1884,6 +1894,12 @@ impl Config {
}).collect());
}

target.split_debuginfo = cfg.split_debuginfo.as_ref().map(|v| {
v.parse().unwrap_or_else(|_| {
panic!("invalid value for target.{triple}.split-debuginfo")
})
});

config.target_config.insert(TargetSelection::from_user(&triple), target);
}
}
Expand Down Expand Up @@ -2282,6 +2298,16 @@ impl Config {
})
}

pub fn split_debuginfo(&self, target: TargetSelection) -> SplitDebuginfo {
self.target_config
.get(&target)
.and_then(|t| t.split_debuginfo)
.or_else(|| {
if self.build == target { self.rust_split_debuginfo_for_build_triple } else { None }
})
.unwrap_or_else(|| SplitDebuginfo::default_for_platform(target))
}

pub fn submodules(&self, rust_info: &GitInfo) -> bool {
self.submodules.unwrap_or(rust_info.is_managed_git_subrepository())
}
Expand Down
5 changes: 5 additions & 0 deletions src/bootstrap/src/utils/change_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
severity: ChangeSeverity::Info,
summary: "A new `boostrap-cache-path` option has been introduced which can be utilized to modify the cache path for bootstrap.",
},
ChangeInfo {
change_id: 121754,
severity: ChangeSeverity::Warning,
summary: "`rust.split-debuginfo` has been moved to `target.<triple>.split-debuginfo` and its default value is determined for each target individually.",
},
];
1 change: 1 addition & 0 deletions src/tools/rust-analyzer/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ xtask = "run --package xtask --bin xtask --"
tq = "test -- -q"
qt = "tq"
lint = "clippy --all-targets -- --cap-lints warn"
codegen = "run --package xtask --bin xtask -- codegen"

[target.x86_64-pc-windows-msvc]
linker = "rust-lld"
Expand Down
3 changes: 3 additions & 0 deletions src/tools/rust-analyzer/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: sed -i '/\[profile.dev]/a opt-level=1' Cargo.toml

- name: Codegen checks (rust-analyzer)
run: cargo codegen --check

- name: Compile (tests)
run: cargo test --no-run --locked ${{ env.USE_SYSROOT_ABI }}

Expand Down
1 change: 0 additions & 1 deletion src/tools/rust-analyzer/.typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ extend-exclude = [
"crates/parser/test_data/lexer/err/",
"crates/project-model/test_data/",
]
ignore-hidden = false

[default]
extend-ignore-re = [
Expand Down
Loading
Loading