forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Adds documentation of the new command line document-tests
in the rustbook
#4
Merged
ifxfrancois
merged 1,984 commits into
test_documentation
from
feature/integrate-review-comments
Oct 7, 2024
Merged
Adds documentation of the new command line document-tests
in the rustbook
#4
ifxfrancois
merged 1,984 commits into
test_documentation
from
feature/integrate-review-comments
Oct 7, 2024
Conversation
This file contains 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
ifxfrancois
force-pushed
the
feature/integrate-review-comments
branch
from
September 18, 2024 08:20
fe243c8
to
a7662c5
Compare
ifxfrancois
force-pushed
the
feature/integrate-review-comments
branch
from
October 1, 2024 16:19
dc14497
to
289da1d
Compare
ifxfrancois
force-pushed
the
feature/integrate-review-comments
branch
2 times, most recently
from
October 2, 2024 09:45
ebc7edb
to
c92980c
Compare
only query `params_in_repr` if def kind is adt Fixes rust-lang#128327 `params_in_repr` was only stored in `encode_info_for_adt`, so we only query it when the def kind belongs to them. https://github.com/rust-lang/rust/blob/9e3e5174462afaf6c3b9db9b35c6d1934521848a/compiler/rustc_metadata/src/rmeta/encoder.rs#L1566-L1567
Replace zero-width whitespace with a visible `\` in the PR template People (incl. myself) tried to copy the `r?` which had an invisible zero-width whitespace (meaning it was actually more like `r⌴?`), causing rustbot to not recognize the instruction, and which makes it difficult to figure out why it didn't work. This PR replaces the zero-width whitespace with a visible `\` alongside a comment to remove the `\`. It's a bit less "visual", but at least it's visible why the rustbot assignment doesn't work.
…er-errors Improve const traits diagnostics for new desugaring r? project-const-traits
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#130863 (Relax a debug assertion for dyn principal *equality* in codegen) - rust-lang#131016 (Apple: Do not specify an SDK version in `rlib` object files) - rust-lang#131140 (Handle `rustc_hir_analysis` cases of `potential_query_instability` lint) - rust-lang#131141 (mpmc doctest: make sure main thread waits for child threads) - rust-lang#131150 (only query `params_in_repr` if def kind is adt) - rust-lang#131151 (Replace zero-width whitespace with a visible `\` in the PR template) - rust-lang#131152 (Improve const traits diagnostics for new desugaring) r? `@ghost` `@rustbot` modify labels: rollup
Previously set to `target_vendor = "unknown"`, but Nintendo is clearly the vendor of the Switch, and is also reflected in the target name itself.
This test demonstrates the need to synchronize the clock of the thread waking up from an epoll_wait from the thread that issued the epoll awake event.
A couple of instructions were left over from an earlier rebase it would seem. They don't impact the logic but the ready_list type is about to change in the next commit. Rather than modify one of these lines in the commit that changes ready_list, only to have these lines removed later on, remove them now. They don't impact the tests results.
This adds a VClock to the epoll implementation's ready_list and has this VClock synced from the thread that updates an event in the ready_list and then has the VClocks of any threads being made runnable again, out of the calls to epoll_wait, synced from it.
A simplification that doesn't impact the epoll implementation's logic. It is not necessary to clone the ready_list before reading its `is_empty` state. This avoids the clone step but more importantly avoids the invisible drop step of the clone.
The target name itself contains GNU, we should set that in the environment as well.
The `armv7a-kmc-solid_asp3-eabi` and `armv7a-kmc-solid_asp3-eabihf` targets clearly have the ABI in their name, so it should also be exposed in Rust's `target_abi` cfg variable.
add caching to most type folders, rm region uniquification Fixes the new minimization of the hang in nalgebra and nalgebra itself :3 this is a bit iffy, especially the cache in `TypeRelating`. I believe all the caches are correct, but it definitely adds some non-local complexity in places. The first commit removes region uniquification, reintroducing the ICE from rust-lang/trait-system-refactor-initiative#27. This does not affect coherence and I would like to fix this by introducing OR-region constraints r? `@compiler-errors`
…li-obk Add vector clock to epoll ready lists Replaces rust-lang#3928 Fixes rust-lang#3911
Const-stabilizes: - `str::from_utf8_unchecked_mut`
Const-stabilizes: - `str::as_bytes_mut` - `str::as_mut_ptr`
Const-stabilizes: - `NonNull::as_mut`
Const-stabilizes: - `UnsafeCell::get_mut`
Const-stabilizes: - `slice::first_mut` - `slice::split_first_mut` - `slice::last_mut` - `slice::split_last_mut`
interpret: always enable write_immediate sanity checks Writing a wrongly-sized scalar somewhere can have quite confusing effects. Let's see how expensive it is to catch this early.
Update hashbrown to 0.15 and adjust some methods This PR updates `hashbrown` to 0.15 in the standard library and adjust some methods as well as removing some as they no longer exists in Hashbrown it-self. - `HashMap::get_many_mut` change API to return array-of-Option - `HashMap::{replace_entry, replace_key}` are removed, FCP close [already finished](rust-lang#44286 (comment)) - `HashSet::get_or_insert_owned` is removed as it no longer exists in hashbrown Closes rust-lang#44286 r? `@Amanieu`
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#131001 (add clarity for custom path installation) - rust-lang#131307 (Android: Debug assertion after setting thread name) - rust-lang#131322 (Update out-dated link) - rust-lang#131335 (grammar fix) r? `@ghost` `@rustbot` modify labels: rollup
…nieu add `naked_asm!` macro for use in `#[naked]` functions tracking issue: rust-lang#90957 Adds the `core::arch::naked_asm` macro, to be used in `#[naked]` functions, but providing better error messages and a place to explain the restrictions on assembly in naked functions. This PR does not yet require that the `naked_asm!` macro is used inside of `#[naked]` functions: - the `asm!` macro can still be used in `#[naked]` functions currently, with the same restrictions and error messages as before. - the `naked_asm!` macro can be used outside of `#[naked]` functions. It has not yet been decided whether that should be allowed long-term. In this PR, the parsing code of `naked_asm!` now enforces the restrictions on assembly in naked functions, with the exception of checking that the `noreturn` option is specified. It also has not currently been decided if `noreturn` should be implicit or not. This PR looks large because it touches a bunch of tests. The code changes are mostly straightforward I think: we now have 3 flavors of assembly macro, and that information must be propagated through the parsing code and error messages. cc `@Lokathor` r? `@Amanieu`
It's simpler, for this tiny module.
Three of the modules don't need to be `pub`, and then `warn(unreachable_pub)` identifies a bunch more things that also shouldn't be `pub`, plus a couple of things that are unused.
It helps people reading the code understand how widely things are used.
It's no longer used meaningfully. This also means `DiagCtxtHandle::err_count_excluding_lint_errs` can be removed.
`FixupError` is isomorphic with `TyOrConstInferVar`, so this commit changes it to just be a wrapper around `TyOrConstInferVar`. Also, move the `Display` impl for `FixupError` next to `FixupError`.
It has a single use.
Inline and remove `next_const_var_id`, `next_int_var_id`, `next_float_var_id`, all of which have a single call site.
Matches involving `GenericArgKind` pairs typically use a single `_` for the impossible case. This commit shortens two verbose matches in this way.
This change `const`-qualifies many methods on Vec and String, notably `as_slice`, `as_str`, `len`. These changes are made behind the unstable feature flag `const_vec_string_slice` with the following tracking issue: rust-lang#129041
…ck, r=nnethercote Don't use Immediate::offset to transmute pointers to integers This applies the relatively new `assert_matches_abi` check in the `offset` operation on immediates, which makes sure that if offsets are used to alter the layout (which is possible because the field layout is arbitrarily picked by the caller), this is not done in a way that breaks the invariant of the `Immediate` type. This leads to ICEs in a GVN mir-opt test, so the second commit fixes GVN. Fixes rust-lang#131064.
…lcnr `rustc_infer` cleanups Various small improvements I found while reading over this code. r? `@lcnr`
…ss35 liballoc: introduce String, Vec const-slicing This change `const`-qualifies many methods on `Vec` and `String`, notably `as_slice`, `as_str`, `len`. These changes are made behind the unstable feature flag `const_vec_string_slice`. ## Motivation This is to support simultaneous variance over ownership and constness. I have an enum type that may contain either `String` or `&str`, and I want to produce a `&str` from it in a possibly-`const` context. ```rust enum StrOrString<'s> { Str(&'s str), String(String), } impl<'s> StrOrString<'s> { const fn as_str(&self) -> &str { match self { // In a const-context, I really only expect to see this variant, but I can't switch the implementation // in some mode like #[cfg(const)] -- there has to be a single body Self::Str(s) => s, // so this is a problem, since it's not `const` Self::String(s) => s.as_str(), } } } ``` Currently `String` and `Vec` don't support this, but can without functional changes. Similar logic applies for `len`, `capacity`, `is_empty`. ## Changes The essential thing enabling this change is that `Unique::as_ptr` is `const`. This lets us convert `RawVec::ptr` -> `Vec::as_ptr` -> `Vec::as_slice` -> `String::as_str`. I had to move the `Deref` implementations into `as_{str,slice}` because `Deref` isn't `#[const_trait]`, but I would expect this change to be invisible up to inlining. I moved the `DerefMut` implementations as well for uniformity.
enable f16 and f128 on windows-gnullvm targets Continuation of rust-lang#130959
coverage: Multiple small tweaks to counter creation I've been experimenting with some larger changes to how coverage counters are assigned to parts of the control-flow graph, and while none of that is ready yet, along the way I've repeatedly found myself wanting these smaller tweaks as a base. There are no changes to compiler output.
Rollup of 3 pull requests Successful merges: - rust-lang#128399 (liballoc: introduce String, Vec const-slicing) - rust-lang#131308 (enable f16 and f128 on windows-gnullvm targets) - rust-lang#131325 (coverage: Multiple small tweaks to counter creation) r? `@ghost` `@rustbot` modify labels: rollup
The new option --document-tests is unstable and documented as such. In order to use it is needed to add `--cfg test` and in case the tests are not marked public to add `--document-private-items`. The implementation hide the auto generate main test function and constants.
ifxfrancois
force-pushed
the
feature/integrate-review-comments
branch
from
October 7, 2024 13:27
3f673cd
to
941c054
Compare
lucagladiator
approved these changes
Oct 7, 2024
ifxfrancois
force-pushed
the
feature/integrate-review-comments
branch
from
October 7, 2024 14:24
85ce51f
to
032f862
Compare
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.
No description provided.