-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rolling up PRs in the queue #19049
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
Rolling up PRs in the queue #19049
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Due to not being able to parametrize over array sizes, `Clone` is only implemented for element types that are `Copy`able.
Make struct variant syntax more consistent with struct syntax and fix an assert in middle::typeck. Fix #19003
`slice_shift_char` splits a `str` into it's leading `char` and the remainder of the `str`. Currently, it returns a `(Option<char>, &str)` such that: "bar".slice_shift_char() => (Some('b'), "ar") "ar".slice_shift_char() => (Some('a'), "r") "r".slice_shift_char() => (Some('r'), "") "".slice_shift_char() => (None, "") This is a little odd. Either a `str` can be split into both a head and a tail or it cannot. So the return type should be `Option<(char, &str)>`. With the current behaviour, in the case of the empty string, the `str` returned is meaningless - it is always the empty string. This commit changes slice_shift_char so that: "bar".slice_shift_char() => Some(('b', "ar")) "ar".slice_shift_char() => Some(('a', "r")) "r".slice_shift_char() => Some(('r', "")) "".slice_shift_char() => None [breaking-change]
…rror creating a new Id object requires the format to match a subset of `ID` format defined by the DOT language. When the format did not match, the function called assert. This was not mentioned in the docs or the spec. I made the failure explicit by returning an Result<Id, ()>.
Items defined in the body of a function has no visibility outside it, and thus have no reason to be marked with stability attributes. Closes #17488
Following [the collections reform RFC](rust-lang/rfcs#235), this commit adds a new `borrow` module to libcore. The module contains traits for borrowing data (`BorrowFrom` and `BorrowFromMut`), generalized cloning (`ToOwned`), and a clone-on-write smartpointer (`Cow`).
This commit generalizes methods like `get` and `remove` for `TreeMap` and `TreeSet` to use the new `std::borrow` infrastructure. [breaking-change]
This commit deprecates the `_equiv` family of methods on `HashMap` and `HashSet` by instead generalizing the "normal" methods like `get` and `remove` to use the new `std::borrow` infrastructure. [breaking-change]
This commit handles the fallout from deprecating `_with` and `_equiv` methods.
Generalizes the BTree-based collections to use the new BorrowFrom infrastructure for more flexible lookups and removals.
liblog, libregex, librustc, libstd
… it's processed during trans.
…_CFLAGS i386-apple-ios already used CFG_JEMALLOC_CFLAGS, so merge that one
…FG_CFLAGS in EXTRA_CFLAGS - CFG_CFLAGS is gone (it was previously only used by jemalloc anyhow). - CFG_JEMALLOC_CFLAGS may contain flags needed for the compiler to function (produce a binary output). - jemalloc's configure runs $(CC) without EXTRA_CFLAGS, and (without this change) will fail if any flags are required for CC to work.
This is especially useful for declaring a static with external linkage in an executable. There isn't any way to do that currently since we mark everything in an executable as internal by default. Also, a quick fix to have the no-compiler-rt target option respected when building staticlibs as well.
Following [the collections reform RFC](rust-lang/rfcs#235), this PR: * Adds a new `borrow` module to libcore. The module contains traits for borrowing data (`BorrowFrom` and `BorrowFromMut`), generalized cloning (`ToOwned`), and a clone-on-write smartpointer (`Cow`). * Deprecates the `_equiv` family of methods on `HashMap` and `HashSet` by instead generalizing the "normal" methods like `get` and `remove` to use the new `std::borrow` infrastructure. * Generalizes `TreeMap`, `TreeSet`, `BTreeMap` and `BTreeSet` to use the new `std::borrow` infrastructure for lookups. [breaking-change]
`slice_shift_char` splits a `str` into it's leading `char` and the remainder of the `str`. Currently, it returns a `(Option<char>, &str)` such that: "bar".slice_shift_char() => (Some('b'), "ar") "ar".slice_shift_char() => (Some('a'), "r") "r".slice_shift_char() => (Some('r'), "") "".slice_shift_char() => (None, "") This is a little odd. Either a `str` can be split into both a head and a tail or it cannot. So the return type should be `Option<(char, &str)>`. With the current behaviour, in the case of the empty string, the `str` returned is meaningless - it is always the empty string. This PR changes `slice_shift_char` so that: "bar".slice_shift_char() => Some(('b', "ar")) "ar".slice_shift_char() => Some(('a', "r")) "r".slice_shift_char() => Some(('r', "")) "".slice_shift_char() => None
…stead_of_fail creating a new Id object requires the format to match a subset of `ID` format defined by the DOT language. When the format did not match, the function called assert. This was not mentioned in the docs or the spec. I made the failure explicit by returning an Result<Id, ()>.
Due to not being able to parametrize over array sizes, `Clone` is only implemented for element types that are `Copy`able.
Hello, `dylib` [seems][1] to be no longer an option for the `kind` key of the `link` attribute. UPDATE: It should be the other way around: It [seems][1] `dylib` has been lost as a possible variant of the `kind` key of the `link` attribute. See the comment below. Regards, Ivan [1]: https://github.com/rust-lang/rust/blob/8f8753878644b0bfb38d24781edb9ef2028730f2/src/librustc/metadata/creader.rs#L237
This code is identical to io::util::copy()
Make struct variant syntax more consistent with struct syntax and fix an assert in middle::typeck. Fix #19003
Came up on IRC that this was a bit unhelpful as to what should actually be *done*. I am new to changing compiler messages, please let me know if there's anything else that needs to be done to accomadate this change. (My build system is still constantly crashing [Is bors contagious?], so this hasn't been formally `check`ed. I figure it's a simple enough change that any consequences [like compile-fail expected messages?] can be eyeballed by someone more experienced.)
Updated all the adjacent character literals in the BCNF that cannot have an optional space between them
Items defined in the body of a function has no visibility outside it, and thus have no reason to inherit its stability. Closes #17488
Baby steps here... Fixed some comments in liblog, libregex, librustc, libstd.
- CFG_CFLAGS is only used for jemalloc - We grew an extra set of flags for jemalloc (CFG_JEMALLOC_CFLAGS) in addition to CFG_CFLAGS - This kills of CFG_CFLAGS and keeps the more specific and less confusing CFG_JEMALLOC_CFLAGS - Additionally, pass CFG_JEMALLOC_CFLAGS to jemalloc's configure slightly differently so things work when people use --sysroot in their CFLAGS.
bors
added a commit
that referenced
this pull request
Nov 18, 2014
lnicola
pushed a commit
to lnicola/rust
that referenced
this pull request
Feb 10, 2025
minor: Remove duplicate method from `hir::Type`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
r? @alexcrichton