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

Design of std::os::consts is unmaintainable/unspeccable #13536

Closed
brson opened this issue Apr 15, 2014 · 3 comments
Closed

Design of std::os::consts is unmaintainable/unspeccable #13536

brson opened this issue Apr 15, 2014 · 3 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Milestone

Comments

@brson
Copy link
Contributor

brson commented Apr 15, 2014

This module looks vaguelly like

pub mod os {
  pub mod consts {
    ... various reexports ...

    pub mod android { ... }
    pub mod linux { .... }
  }
}

All constants for all platforms are available to all platforms. There is no bound to the number of public modules that must be added here over time, and doubtless different implementations of Rust must support different platforms. In other words, as designed this module will never stop changing. This is a mess waiting to happen. I suggest only exposing the current arch and moving any necessary cross-arch capability into rustc directly. Nominating.

@pnkfelix
Copy link
Member

Assigning 1.0, P-backcompat-libs.

@pnkfelix pnkfelix added this to the 1.0 milestone Apr 17, 2014
@pongad
Copy link
Contributor

pongad commented Apr 20, 2014

@brson I'll be happy to try this. I'm not quite sure what you want the outcome to be though; I'll find you on the IRC.

@brson
Copy link
Contributor Author

brson commented Apr 22, 2014

@pongad I want the outcome to be that os::consts defines only a single set of constants for FAMILY, etc., so it should look essentially like

mod consts {
    static FAMILY: &'static str = "unix";
    static SYSNAME: &'static str = "linux";
    ...
}

And in fact could even be defined using cfg attributes on mod const like

#[cfg(target_os = "linux")]
mod consts {
    static FAMILY: &'static str = "unix";
    static SYSNAME: &'static str = "linux";
    ...
}

Just making this change will probably break parts of rustc that do want to know this information for all platforms. I would then just duplicate the constants directly in rustc.

@bors bors closed this as completed in 2bb2341 Apr 25, 2014
notriddle pushed a commit to notriddle/rust that referenced this issue Nov 10, 2022
docs: add crates section to the manual

closes rust-lang#13533

Added a section to the user manual, to make it easier for users to find the correct crate.
notriddle pushed a commit to notriddle/rust that referenced this issue Nov 10, 2022
docs: fix adoc links

Correct rust-lang#13536 with adoc link syntax
flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 7, 2024
Allow to go through clippy lints page without javascript

Fixes rust-lang#13536.

This is the follow-up of rust-lang/rust-clippy#13269.

This PR makes it possible to expand/collapse lints (individually) without JS. To achieve this result, there are two ways:
1. Use `details` and `summary` tags. Problem with this approach is that the web browser search may open the `details` tags automatically if content matching it is inside. From a previous discussion with `@Alexendoo,` it seems to not be a desired behaviour.
2. Use a little trick where you use a `label` and a checkbox where the checkbox is in fact hidden. Then it's just a matter of CSS.

r? `@Alexendoo`

changelog: Allow to go through clippy lints page without JS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants