Skip to content

Conversation

mejrs
Copy link
Contributor

@mejrs mejrs commented May 1, 2025

@rustbot rustbot added A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 1, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I have some feedback

Comment on lines 7 to 8
// Regression test for issue #13560, the test itself is all in the dependent
// libraries. The fail which previously failed to compile is `no_link_crate`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:

Suggested change
// Regression test for issue #13560, the test itself is all in the dependent
// libraries. The fail which previously failed to compile is `no_link_crate`.
// Regression test for #13560. Previously, it was possible to trigger an assert in crate numbering if a series of crates being loaded included a "syntax-only" extern crate.

Discussion: is this regression test actually testing anything now? This cnum adjustment fix was introduced in #13565 to fix #13560, but looking at the current impl, I'm not observing any special enum adjustments related to "syntax-only" crates. #[no_link] AFAICT corresponds to CrateDepKind::MacrosOnly in crate loading, and even there I don't observe this adjustment.

cc @bjorn3 in case you have advice on this test. I can't say I understand what #[no_link]-the-builtin-attribute is supposed to do, or what its purpose is in this test. The original test involved

#![crate_type = "rlib"]
#![feature(phase)]

#[phase(syntax)] extern crate t1 = "issue-13560-1";
#[phase(syntax, link)] extern crate t2 = "issue-13560-2";

and based on vibes (#![feature(phase)] predates zulip, and there are practically no discussions on this feature), I suspect the current form of the test does not reflect the OG version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussion: honestly, I have no idea what this is actually testing.

The original test intention was to check that we produce an error if the declared extern crate we can't find.

#[feature(phase)];

#[phase(syntax)]
extern mod doesnt_exist; //~ ERROR can't find crate

fn main() {}

I suppose we can keep this repurposed test to check that even with #[no_link] we report an error if we can't find the crate. Can you leave a test comment to that effect?

@jieyouxu
Copy link
Member

jieyouxu commented May 2, 2025

@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 2, 2025
@rustbot
Copy link
Collaborator

rustbot commented May 2, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 2, 2025
@mejrs
Copy link
Contributor Author

mejrs commented May 2, 2025

renamed the xc files, will do the rest tomorrow.

@mejrs
Copy link
Contributor Author

mejrs commented May 3, 2025

Pushed a separate commit for the feedback, lmk when you want me to squash

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 3, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, can you squash the commits?

Comment on lines +4 to +6
//! But it appears we don't mess with crate numbering for
//! `#[no_link]` crates anymore, so this test doesn't seem
//! to test anything now.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark: I think we'll leave this as an exercise to the person modifying #[no_link]-the-attribute...

Copy link
Contributor Author

@mejrs mejrs May 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not rub it in ;)

@jieyouxu
Copy link
Member

jieyouxu commented May 3, 2025

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 3, 2025
@mejrs
Copy link
Contributor Author

mejrs commented May 3, 2025

squashed.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 3, 2025
@jieyouxu
Copy link
Member

jieyouxu commented May 3, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 3, 2025

📌 Commit 9a574b0 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 3, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request May 4, 2025
Rollup of 7 pull requests

Successful merges:

 - rust-lang#139675 (Add the AVX10 target features)
 - rust-lang#140286 (Check if format argument is identifier to avoid error err-emit)
 - rust-lang#140456 (Fix test simd/extract-insert-dyn on s390x)
 - rust-lang#140551 (Move some tests out of tests/ui)
 - rust-lang#140588 (Adjust some ui tests re. target-dependent errors)
 - rust-lang#140617 (Report the `unsafe_attr_outside_unsafe` lint at the closest node)
 - rust-lang#140626 (allow `#[rustfmt::skip]` in combination with `#[naked]`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit bddb015 into rust-lang:master May 4, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone May 4, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 4, 2025
Rollup merge of rust-lang#140551 - mejrs:test4, r=jieyouxu

Move some tests out of tests/ui

r? `@jieyouxu`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tidy Area: The tidy tool S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants