Skip to content

Tracking issue for --extern nounused #98400

Open

Description

@ehuss

This is a tracking issue for the nounused CLI option for --extern.

This option marks the given crate so that it does not trigger unused_crate_dependencies warnings for the crate.

This is useful if the given crate might be unused, but shouldn't cause a warning.
For example, when using --extern to link with standard library crates, and the user does not explicitly use one of those crates.

The syntax is [opts ':'] name ['=' path] where opts is a comma separated list of options:

--extern nounused:foo=/path/to/libfoo.rlib

See also #98398 and #98399 which share this syntax extension.

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

Unresolved Questions

  • The syntax for adding options to --extern flags was added without much bikeshedding or discussion. It may need adjusting to be more flexible for more complex options.

Implementation history

Activity

  1. added
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    on Jun 22, 2022
  2. petrochenkov commented on Jun 22, 2022

    @petrochenkov
    Contributor
  3. est31 commented on Jun 24, 2022

    @est31
    Member

    I think the name is a bit hard to read. What about no_unused or allow_unused?

  4. jsgf commented on Jun 25, 2022

    @jsgf
    Contributor

    I don't care particularly, but it should be consistent with noprelude.

    Since these aren't at all user-facing, I'm not too concerned about readability so long as they make sense to someone who does have to deal with them.

  5. est31 commented on Jun 25, 2022

    @est31
    Member

    I see, the noprelude argument convinced me.

  6. ehuss commented on Jun 25, 2022

    @ehuss
    ContributorAuthor

    #98405 is proposing to possibly use +/- syntax like -prelude or +priv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions