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

Accessing elements in a tuple #13691

Closed
jacob-hegna opened this issue Apr 22, 2014 · 1 comment
Closed

Accessing elements in a tuple #13691

jacob-hegna opened this issue Apr 22, 2014 · 1 comment

Comments

@jacob-hegna
Copy link
Contributor

Many languages with tuples include functions to get specific elements out of them, ex:

putStrLn $ snd ("Do not print", "Access me!")

It would be helpful to have similar functionality in rust without having to use pattern matching

@jacob-hegna
Copy link
Contributor Author

@jdm jdm closed this as completed Apr 23, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 28, 2024
…ang#13691)

In preparation of rust-lang#13556, I want to remove the dependency on
`clippy_config`, as I don't think that we want to publish that for
outside consumers. To do this the 2 dependecies on `clippy_config` had
to be removed:

1. The MSRV implementation was in `clippy_config`, but was required in
`qualify_min_const`. I think exposing the MSRV infrastructure and the
MSRVs we defined might also be helpful for `clippy_utils` users. I don't
see why it should not be able to live in `clippy_utils` from a technical
point of few.
2. The `create_disallowed_map` function that took in a
`clippy_utils::types::DisallowedPath` is moved to the `DisallowedPath`
implementation. This also fits there and is only useful for Clippy and
not in `clippy_utils` for external consumers.

`clippy_config` now depends in `clippy_utils`, so the dependecy just got
reversed. But having the `clippy_utils` crate as the base of the
dependency tree in Clippy makes sense.

changelog: none
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

No branches or pull requests

2 participants