This commit renames the features for the `std::old_io` and `std::old_path`
modules to `old_io` and `old_path` to help facilitate migration to the new APIs.
This is a breaking change as crates which mention the old feature names now need
to be renamed to use the new feature names.
[breaking-change]
This commit performs a stabilization pass over the `std::ascii` module taking
the following actions:
* the module name is now stable
* `AsciiExt` is now stable after moving its type parameter to an `Owned`
associated type
* `AsciiExt::is_ascii` is now stable
* `AsciiExt::to_ascii_uppercase` is now stable
* `AsciiExt::to_ascii_lowercase` is now stable
* `AsciiExt::eq_ignore_ascii_case` is now stable
* `AsciiExt::make_ascii_uppercase` is added to possibly replace
`OwnedAsciiExt::into_ascii_uppercase` (similarly for lowercase variants).
* `escape_default` now returns an iterator and is stable
* `EscapeDefault` is now stable
Trait implementations are now also marked stable.
Primarily it is still unstable to *implement* the `AsciiExt` trait due to it
containing some unstable methods.
[breaking-change]
Previously an implementation of a stable trait allows implementations of
unstable methods. This updates the stability pass to ensure that all items of an
impl block of a trait are indeed stable on the trait itself.
In most places this preserves the current API by adding an explicit
`'static` bound.
Notably absent are some impls like `unsafe impl<T: Send> Send for
Foo<T>` and the `std::thread` module. It is likely that it will be
possible to remove these after auditing the code to ensure restricted
lifetimes are safe.
More progress on #22251.
Previously Send was defined as `trait Send: 'static {}`. As detailed in
https://github.com/rust-lang/rfcs/pull/458, the `'static` bound is not
actually necessary for safety, we can use lifetimes to enforce that more
flexibly.
`unsafe` code that was previously relying on `Send` to insert a
`'static` bound now may allow incorrect patterns, and so should be
audited (a quick way to ensure safety immediately and postpone the audit
is to add an explicit `'static` bound to any uses of the `Send` type).
cc #22251.
- Now "make check-stage2-T-aarch64-linux-android-H-x86_64-unknown-linux-gnu" works (#21773)
- Fix & enable debuginfo tests for android (#10381)
- Fix & enable more tests for android (both for arm/aarch64)
- Enable many already-pass tests on android (both for arm/aarch64)
Now that the necessary associated types exist for the `IntoIterator` trait this
commit stabilizes the trait as-is as well as all existing implementations.
This is a more introductory document, suitable for Part II. The arcane details move to an "Advanced macros" chapter in Part III.
Conflicts:
src/doc/trpl/macros.md
Pass features along during expansion
Use the set of passed features to detect uses of feature-gated macros without the corresponding feature enabled.
Fix#22234.
----
Also, the framework this add (passing along a reference to the features in the expansion context) is a necessary precursor for landing a properly feature-gated desugaring-based overloaded-`box` and placement-`in` (#22181).
----
This is fixing a bug, but since there might be code out there that is unknowingly taking advantage of that bug, I feel obligated to mark this as a:
[breaking-change]
Some examples for `std::num::Float`
~~This is WIP for making examples for `f32`. This probably won't pass `make tidy` and I'm not sure which `f32` needs documentation. https://github.com/rust-lang/rust/issues/22025 shows 2 sets of `f32` which seems split between `core` and `std`. I'm not sure which should be documented but I started doing a couple from `std`. Easy to move if that's where they go...~~
~~Gotta build it eventually to actually see if the docs actually appear where I think they will or if I'm just disillusioned.~~
cc @steveklabnik
The test \"signal_reported_right\" send a signal `1` to `/bin/sh`, and check
the status code to check if the signal is reported right.
Under OpenBSD, the signal `1` (`SIGHUP`) is catched by `/bin/sh`,
resulting the test failed.
Use the uncatchable signal `9` (`SIGKILL`) for test.
This commit mostly replaces some of the uses of os::args with env::args.
This, for obvious reasons is based on top of #22400. Do not r+ before that lands.
When matching against strings/slices, we call the comparison function
for strings, which takes two string slices by value. The slices are
passed in memory, and currently we just pass in a pointer to the
original slice. That can cause misoptimizations because we emit a call
to llvm.lifetime.end for all by-value arguments at the end of a
function, which in this case marks the original slice as dead.
So we need to properly create copies of the slices to pass them to the
comparison function.
Fixes#22008
This redux of CONTRIBUTING.md adds in more information, including
subsuming both compliment-bugreport.md and Note-development-policy
in the wiki.
I only glanced at the broad TOC of Note-development-policy, and did
not use the text as the basis for the re-write. This will then address
the last outstanding part of #5831.
The connect_error test check if connecting to "0.0.0.0:1" works (it
shouldn't). And in case of error, the test expects a ConnectionRefused
error.
Under OpenBSD, trying to connect to "0.0.0.0" isn't a ConnectionRefused:
it is an InvalidInput error.
The patch allow the error to be ConnectionRefused or InvalidInput.
The first commit adds a short note which I believe will reduce worries in people who work with closures very often and read the Rust book for their first time.
The second commit consists solely of tiny typo fixes. In some cases, I changed "logical" quotations like
She said, "I like programming".
to
She said, "I like programming."
because the latter seems to be the prevalent style in the book.
In trans_slice_vec we currently use arrayalloca, which gives us a
pointer to the element type with enough memory allocated for the
requested number of elements. This works, but everywhere else we use
the [n x T] type for fixed size arrays and so we have to bitcast the
pointer here. Let's directly use the proper type for the allocation and
remove some code duplication along the way.
Changes std::os::errno to return i32, the return type used by the function being delegated to.
This is my first contribution, so feel free to give me advice. I'll be happy to correct things.