Skip to content

Rollup of 9 pull requests #123036

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

Merged
merged 29 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d1ba632
Delegation: fix ICE on `bound_vars` divergence
Bryanskiy Mar 22, 2024
bf12aa4
Don't emit an error about failing to produce a file with a specific name
pacak Mar 21, 2024
b84326e
tests/ui: Add a directory for warnings, add a test
pacak Mar 22, 2024
08235b1
Validate that we're only matching on unit struct for path pattern
compiler-errors Mar 22, 2024
87808e7
Use `chunk_by` when building `ReverseSccGraph`
cuviper Mar 24, 2024
127c36c
add test for https://github.com/rust-lang/rust/issues/119731
matthiaskrgr Mar 24, 2024
db68dc2
add test for #116599
matthiaskrgr Mar 24, 2024
8ed5e67
add test for #114464
matthiaskrgr Mar 24, 2024
cdea6d8
add test for ICE: no entry found for key for const function in gener…
matthiaskrgr Mar 24, 2024
b151e06
add test for ICE: min_specialization: Ok(['?0, Const { ty: usize, ki…
matthiaskrgr Mar 24, 2024
6203ebe
add test for ICE with associated_const_equality #108220
matthiaskrgr Mar 24, 2024
5e0d8c3
add test for ICE: no errors encountered even though delay_span_bug i…
matthiaskrgr Mar 24, 2024
56ea366
add test for Failed to normalize closure with TAIT #109020
matthiaskrgr Mar 24, 2024
e800b99
add tests for ICE in mir building with captured value of unresolved t…
matthiaskrgr Mar 24, 2024
e4d816e
add tests for ICE: 'broken MIR: bad assignment: NoSolution' on trait …
matthiaskrgr Mar 24, 2024
4719293
Fix unpretty UI test when /tmp does not exist
Alexendoo Mar 24, 2024
2cb5347
Rename `{enter,exit}_lint_attrs` to `check_attributes{,_post}`
Alexendoo Mar 24, 2024
e6918b1
Add async-closures/once.rs back to cranelift tests
compiler-errors Mar 25, 2024
3733dcc
Add needs-unwind annotations to a couple of tests
bjorn3 Mar 25, 2024
5f5dcae
Add needs-unwind for proc macro tests
bjorn3 Mar 25, 2024
ded16b3
Rollup merge of #122842 - pacak:explicit_name, r=michaelwoerister
matthiaskrgr Mar 25, 2024
ccc5310
Rollup merge of #122881 - Bryanskiy:delegation-fixes-2, r=petrochenkov
matthiaskrgr Mar 25, 2024
e9ec442
Rollup merge of #122910 - compiler-errors:unit-struct-in-path-pat-onl…
matthiaskrgr Mar 25, 2024
9b4ee1b
Rollup merge of #122970 - cuviper:use-chunk_by, r=Mark-Simulacrum
matthiaskrgr Mar 25, 2024
877f293
Rollup merge of #122988 - matthiaskrgr:icetests, r=petrochenkov
matthiaskrgr Mar 25, 2024
657dd0b
Rollup merge of #122999 - Alexendoo:unpretty-avoid-crash-test, r=petr…
matthiaskrgr Mar 25, 2024
10daf8a
Rollup merge of #123001 - Alexendoo:check-attributes, r=oli-obk
matthiaskrgr Mar 25, 2024
11f168f
Rollup merge of #123022 - compiler-errors:clif-tests-async-closure, r…
matthiaskrgr Mar 25, 2024
4369718
Rollup merge of #123034 - bjorn3:test_ignores, r=compiler-errors
matthiaskrgr Mar 25, 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
Prev Previous commit
Next Next commit
Don't emit an error about failing to produce a file with a specific name
If user never gave an explicit name
  • Loading branch information
pacak committed Mar 22, 2024
commit bf12aa49e71d6e444c34d7adb87647f36b7dde1a
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_ssa/src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ fn produce_final_output_artifacts(
.unwrap()
.to_owned();

if crate_output.outputs.contains_key(&output_type) {
if crate_output.outputs.contains_explicit_name(&output_type) {
// 2) Multiple codegen units, with `--emit foo=some_name`. We have
// no good solution for this case, so warn the user.
sess.dcx().emit_warn(errors::IgnoringEmitPath { extension });
Expand Down
5 changes: 5 additions & 0 deletions compiler/rustc_session/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,11 @@ impl OutputTypes {
self.0.contains_key(key)
}

/// Returns `true` if user specified a name and not just produced type
pub fn contains_explicit_name(&self, key: &OutputType) -> bool {
self.0.get(key).map_or(false, |f| f.is_some())
}

pub fn iter(&self) -> BTreeMapIter<'_, OutputType, Option<OutFileName>> {
self.0.iter()
}
Expand Down
23 changes: 23 additions & 0 deletions tests/ui/issues/no-explicit-path-issue-122509.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//@ build-pass
//@ compile-flags: -C codegen-units=2 --emit asm

fn one() -> usize {
1
}

pub mod a {
pub fn two() -> usize {
::one() + ::one()
}
}

pub mod b {
pub fn three() -> usize {
::one() + ::a::two()
}
}

fn main() {
a::two();
b::three();
}