Skip to content

Assign more diagnostic codes #15754

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 1 commit into from Jul 19, 2014
Merged

Assign more diagnostic codes #15754

merged 1 commit into from Jul 19, 2014

Conversation

ghost
Copy link

@ghost ghost commented Jul 17, 2014

No description provided.

@@ -52,6 +56,10 @@ macro_rules! span_err(

#[macro_export]
macro_rules! span_warn(
Copy link
Member

Choose a reason for hiding this comment

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

These macros may actually be best written as this:

macro_rules! span_foo(
    ($session:expr, $span:expr, $code:ident, $($message:tt)*) => ({
        __diagnostic_used!($code);
        $session.span_warn_with_code($span, format!($($message)*), stringify!($code))
    })
)

That way you'll handle things like foo=bar as well and you won't need duplicate cases for arguments and no arguments.

Copy link
Author

Choose a reason for hiding this comment

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

This is great, thanks. Fixed.

@bors bors closed this Jul 19, 2014
@bors bors merged commit 5274e99 into rust-lang:master Jul 19, 2014
@ghost ghost deleted the diagnostics branch August 18, 2014 18:19
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 27, 2023
…ocal_too, r=Veykril

fix: Dedup duplicate crates with differing origins in CrateGraph construction

Partially fixes rust-lang#15656 . Until now the condition for deduplication in crate graphs were the strict equality of two crates. One problem that arises from this is that in certain conditions when we see the same crate having different `CrateOrigin`s the first occurrence would be kept. This approach however results in some unwanted results such as making renaming forbidden as this has been recently only made available for local crates. The given example in rust-lang#15656 can still not be resolved with this PR as that involves taking inconsistencies between dependencies into consideration. This will be addressed in a future PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants