- 14 1月, 2021 1 次提交
-
-
由 Lukas Lueg 提交于
-
- 07 1月, 2021 1 次提交
-
-
由 Lukas Lueg 提交于
-
- 01 1月, 2021 1 次提交
-
-
由 Lukas Lueg 提交于
-
- 31 12月, 2020 13 次提交
-
-
由 bors 提交于
Rollup of 9 pull requests Successful merges: - #78934 (refactor: removing library/alloc/src/vec/mod.rs ignore-tidy-filelength) - #79479 (Add `Iterator::intersperse`) - #80128 (Edit rustc_ast::ast::FieldPat docs) - #80424 (Don't give an error when creating a file for the first time) - #80458 (Some Promotion Refactoring) - #80488 (Do not create dangling &T in Weak<T>::drop) - #80491 (Miri: make size/align_of_val work for dangling raw ptrs) - #80495 (Rename kw::Invalid -> kw::Empty) - #80513 (Add regression test for #80062) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Mara Bos 提交于
Add regression test for #80062 Closes #80062. r? `@lcnr`
-
由 Mara Bos 提交于
Rename kw::Invalid -> kw::Empty See https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Is.20there.20a.20symbol.20for.20the.20empty.20string.3F/near/220054471 for context. r? `@petrochenkov`
-
由 Mara Bos 提交于
Miri: make size/align_of_val work for dangling raw ptrs This is needed for https://github.com/rust-lang/rust/issues/80365#issuecomment-752128105. r? `@oli-obk`
-
由 Mara Bos 提交于
Do not create dangling &T in Weak<T>::drop Since at this point all strong pointers have been dropped, the wrapped `T` has also been dropped. As such, creating a `&T` to the dropped place is negligent at best (language UB at worst). Since we have `Layout::for_value_raw` now, use that instead of `Layout::for_value` to avoid creating the `&T`. This does have implications for custom (potentially thin) DSTs, though much less severe than those discussed in #80407. Specifically, one of two things has to be true: - It has to be possible to use a `*const T` to a dropped (potentially custom, potentially thin) unsized tailed object to determine the layout (size/align) of the object. This is what is currently implemented (though with `&T` instead of `&T`). The validity of reading some location after it has been dropped is an open question IIUC (https://github.com/rust-lang/unsafe-code-guidelines/issues/188) (except when the whole type is `Copy`, per `drop_in_place`'s docs). In this design, custom DSTs would get a `*mut T` and use that to return layout, and must be able to do so while in the "zombie" (post-drop, pre-free) state. - `RcBox`/`ArcInner` compute and store layout eagerly, so that they don't have to ask the type for its layout after dropping it. Importantly, this is already true today, as you can construct `Rc<DST>`, create a `Weak<DST>`, and drop the `Rc` before the `Weak`. This PR is a strict improvement over the status quo, and the above question about potentially thin DSTs will need to be resolved by any custom DST proposal.
-
由 Mara Bos 提交于
Some Promotion Refactoring Clean up promotion a bit: * factor out some common code * more exhaustive matches This *should* not break anything... the only potentially-breaking change is that `BorrowKind::Shallow | BorrowKind::Unique` are now rejected for internal references. r? ``@oli-obk``
-
由 Mara Bos 提交于
Don't give an error when creating a file for the first time Previously, `os.remove` would always give a FileNotFound error the first time you called it, causing bootstrap to make unnecessary copies. This now only calls `remove()` if the file exists, avoiding the unnecessary error. This is a pretty small cleanup but I think it's useful. Taken from https://github.com/rust-lang/rust/pull/79540.
-
由 Mara Bos 提交于
Edit rustc_ast::ast::FieldPat docs Punctuation fixes.
-
由 Mara Bos 提交于
Add `Iterator::intersperse` This is a rebase of #75784. I'm hoping to push this past the finish line! cc `@jonas-schievink`
-
由 Mara Bos 提交于
refactor: removing library/alloc/src/vec/mod.rs ignore-tidy-filelength This PR removes the need for ignore-tidy-filelength for library/alloc/src/vec/mod.rs which is part of the issue #60302 It is probably easiest to review this PR by looking at it commit by commit rather than looking at the overall diff.
-
由 Camelid 提交于
-
由 Jonas Schievink 提交于
-
由 bors 提交于
Bump bootstrap compiler to 1.50 beta r? `@pietroalbini`
-
- 30 12月, 2020 24 次提交
-
-
由 Mara Bos 提交于
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #80185 (Fix ICE when pointing at multi bytes character) - #80260 (slightly more typed interface to panic implementation) - #80311 (Improvements to NatVis support) - #80337 (Use `desc` as a doc-comment for queries if there are no doc comments) - #80381 (Revert "Cleanup markdown span handling") - #80492 (remove empty wraps, don't return Results from from infallible functions) - #80509 (where possible, pass slices instead of &Vec or &String (clippy::ptr_arg)) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 LeSeulArtichaut 提交于
-
由 Mark Rousskov 提交于
-
由 Yuki Okushi 提交于
where possible, pass slices instead of &Vec or &String (clippy::ptr_arg)
-
由 Yuki Okushi 提交于
remove empty wraps, don't return Results from from infallible functions This makes code easier to understand because it is more obvious when a function actually can't fail (return Err or None) Make functions that only ever return Some(x), return x directly Remove return type from functions that return Option<(), Err> but would only ever return Ok(()). Found with `clippy::unnecessary_wraps`
-
由 Yuki Okushi 提交于
Revert "Cleanup markdown span handling" Reverts rust-lang/rust#80244. This caused a diagnostic regression, originally it was: ``` warning: unresolved link to `std::process::Comman` --> link.rs:3:10 | 3 | //! [a]: std::process::Comman | ^^^^^^^^^^^^^^^^^^^^ no item named `Comman` in module `process` | = note: `#[warn(broken_intra_doc_links)]` on by default ``` but after that PR rustdoc now displays ``` warning: unresolved link to `std::process::Comman` --> link.rs:1:14 | 1 | //! Links to [a] [link][a] | ^^^ no item named `Comman` in module `process` | = note: `#[warn(broken_intra_doc_links)]` on by default ``` which IMO is much less clear. cc `@bugadani,` thanks for catching this in https://github.com/rust-lang/rust/pull/77859. r? `@GuillaumeGomez`
-
由 Yuki Okushi 提交于
Use `desc` as a doc-comment for queries if there are no doc comments This at least gives *some* idea of what the query does even if it's not very readable. Some examples: ![image](https://user-images.githubusercontent.com/23638587/103021399-13e15c00-4518-11eb-8121-940774ae2fd1.png) ![image](https://user-images.githubusercontent.com/23638587/103021448-222f7800-4518-11eb-8ee6-cc10795fdc22.png) ![image](https://user-images.githubusercontent.com/23638587/103021434-1d6ac400-4518-11eb-885b-59d00c57bc70.png) I want to turn `{}` into either `_` or the stringified expr, but [I'm not sure how to do that](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Evaluate.20format.20string.20in.20proc-macro). In the meantime, this is better than having no docs at all.
-
由 Yuki Okushi 提交于
Improvements to NatVis support NatVis files describe how to display types in some Windows debuggers, such as Visual Studio, WinDbg, and VS Code. This commit makes several improvements: * Adds visualizers for Rc<T>, Weak<T>, and Arc<T>. * Changes [size] to [len], for consistency with the Rust API. Visualizers often use [size] to mirror the size() method on C++ STL collections. * Several visualizers used the PVOID and ULONG typedefs. These are part of the Windows API; they are not guaranteed to always be defined in a pure Rust DLL/EXE. I converted PVOID to `void*` and `ULONG` to `unsigned long`. * Cosmetic change: Removed {} braces around the visualized display for `Option` types. They now display simply as `Some(value)` or `None`, which reflects what is written in source code. * The visualizer for `alloc::string::String` makes assumptions about the layout of `String` (it casts `String*` to another type), rather than using symbolic expressions. This commit changes the visualizer so that it simply uses symbolic expressions to access the string data and string length. * The visualizers for `str` and `String` now place the character data array under a synthetic `[chars]` node. When expanding a `String` node, users rarely want to see an array of characters. This just places them behind one expansion node / level.
-
由 Yuki Okushi 提交于
slightly more typed interface to panic implementation The panic payload is currently being passed around as a `usize`. However, it actually is a pointer, and the involved types are available on all ends of this API, so I propose we use the proper pointer type to avoid some casts. Avoiding int-to-ptr casts also makes this code work with `miri -Zmiri-track-raw-pointers`.
-
由 Yuki Okushi 提交于
Fix ICE when pointing at multi bytes character Fixes #80134 Seems this ICE was introduced by #73953, checking width of span to avoid ICE.
-
由 Yuki Okushi 提交于
-
由 Ralf Jung 提交于
-
由 bors 提交于
Make copy[_nonoverlapping] const Constifies * `intrinsics::copy` and `intrinsics::copy_nonoverlapping` * `ptr::read` and `ptr::read_unaligned` * `*const T::read` and `*const T::read_unaligned` * `*mut T::read` and `*mut T::read_unaligned` * `MaybeUninit::assume_init_read`
-
由 Matthias Krüger 提交于
remove unused return type of dropck::check_drop_obligations() don't wrap return type in Option in get_macro_by_def_id() since we would always return Some(..) remove redundant return type of back::write::optimize() don't Option-wrap return type of compute_type_parameters() since we always return Some(..) don't return empty Result in assemble_generator_candidates() don't return empty Result in assemble_closure_candidates() don't return empty result in assemble_fn_pointer_candidates() don't return empty result in assemble_candidates_from_impls() don't return empty result in assemble_candidates_from_auto_impls() don't return emtpy result in assemble_candidates_for_trait_alias() don't return empty result in assemble_builtin_bound_candidates() don't return empty results in assemble_extension_candidates_for_traits_in_scope() and assemble_extension_candidates_for_trait() remove redundant wrapping of return type of StripItem::strip() since it always returns Some(..) remove unused return type of assemble_extension_candidates_for_all_traits()
-
由 Matthias Krüger 提交于
-
由 bors 提交于
Rollup of 13 pull requests Successful merges: - #79812 (Lint on redundant trailing semicolon after item) - #80348 (remove redundant clones (clippy::redundant_clone)) - #80358 (Edit rustc_span documentation) - #80457 (Add missing commas to `rustc_ast_pretty::pp` docs) - #80461 (Add llvm-libunwind change to bootstrap CHANGELOG) - #80464 (Use Option::map_or instead of open coding it) - #80465 (Fix typo in ffi-pure.md) - #80467 (More uses of the matches! macro) - #80469 (Fix small typo in time comment) - #80472 (Use sans-serif font for the "all items" page links) - #80477 (Make forget intrinsic safe) - #80482 (don't clone copy types) - #80487 (don't redundantly repeat field names) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Yuki Okushi 提交于
don't redundantly repeat field names r? `@Dylan-DPC`
-
由 Yuki Okushi 提交于
don't clone copy types r? `@Dylan-DPC`
-
由 Yuki Okushi 提交于
Make forget intrinsic safe
-
由 Yuki Okushi 提交于
Use sans-serif font for the "all items" page links The "all items" pages' links aren't using a sans-serif font unlike the rest of equivalent items in the other module pages. ``@Nemo157`` reported me this issue so here is the fix! r? ``@Nemo157``
-
由 Yuki Okushi 提交于
Fix small typo in time comment I was reading through [this PR](https://github.com/rust-lang/rust/pull/77727/files) and noticed a [small typo](https://github.com/rust-lang/rust/pull/77727/files#diff-3183738c82f747fd92bb573712073aa384b16e14d154bf2df18f41077edc31cbR240) smuggled though. This just fixes that.
-
由 Yuki Okushi 提交于
More uses of the matches! macro `@rustbot` modify labels +C-cleanup +T-compiler
-