about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2020-12-31Auto merge of #80435 - pietroalbini:compression-formats, r=Mark-Simulacrumbors-6/+29
Only produce .xz tarballs on CI This PR adds a `./configure` option to choose which tarball compression formats to produce, and changes our CI configuration to only produce `.xz` tarballs. The release process will then recompress everything into `.gz` when producing a release. This will drastically reduce our storage costs for CI artifacts, as we'd stop storing the same data twice. **Stable, beta and nightly releases will not be affected by this at all.** Before landing this we'll need to increase the VM size of our release process, to recompress everything in a reasonable amount of time. r? `@Mark-Simulacrum`
2020-12-30Auto merge of #80530 - m-ou-se:rollup-zit69ko, r=m-ou-sebors-13/+43
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
2020-12-30Rollup merge of #80513 - LeSeulArtichaut:80062-test, r=lcnrMara Bos-0/+21
Add regression test for #80062 Closes #80062. r? `@lcnr`
2020-12-30Rollup merge of #80495 - jyn514:rename-empty, r=petrochenkovMara Bos-6/+6
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`
2020-12-30Rollup merge of #80491 - RalfJung:dangling-of-val, r=oli-obkMara Bos-0/+7
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`
2020-12-30Rollup merge of #80424 - jyn514:bootstrap-cleanup, r=Mark-SimulacrumMara Bos-2/+4
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.
2020-12-30Rollup merge of #79479 - camelid:intersperse, r=m-ou-seMara Bos-1/+1
Add `Iterator::intersperse` This is a rebase of #75784. I'm hoping to push this past the finish line! cc `@jonas-schievink`
2020-12-30Rollup merge of #78934 - DeveloperC286:issue_60302_vec, r=m-ou-seMara Bos-4/+4
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.
2020-12-30Add Iterator::intersperseJonas Schievink-1/+1
2020-12-30Auto merge of #80511 - Mark-Simulacrum:bump-stage0, r=pietroalbinibors-9/+3
Bump bootstrap compiler to 1.50 beta r? `@pietroalbini`
2020-12-30Auto merge of #80510 - JohnTitor:rollup-gow7y0l, r=JohnTitorbors-161/+269
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
2020-12-30Add regression test for #80062LeSeulArtichaut-0/+21
2020-12-30bootstrap: extract from any compression algorithm during distcheckPietro Albini-5/+2
2020-12-30Rename kw::Invalid -> kw::EmptyJoshua Nelson-6/+6
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.
2020-12-30Bump bootstrap compiler to 1.50 betaMark Rousskov-9/+3
2020-12-30Rollup merge of #80509 - matthiaskrgr:ptr_arg, r=varkorYuki Okushi-1/+1
where possible, pass slices instead of &Vec or &String (clippy::ptr_arg)
2020-12-30Rollup merge of #80492 - matthiaskrgr:tasty_wraps, r=varkorYuki Okushi-6/+6
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`
2020-12-30Rollup merge of #80381 - rust-lang:revert-80244-spans, r=GuillaumeGomezYuki Okushi-89/+126
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`
2020-12-30Rollup merge of #80311 - sivadeilra:natvis, r=petrochenkovYuki Okushi-49/+71
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.
2020-12-30Fix ICE when pointing at multi bytes characterYuki Okushi-16/+65
2020-12-30CTFE: test size/align_of_val_raw on dangling pointersRalf Jung-0/+7
2020-12-30Auto merge of #79684 - usbalbin:const_copy, r=oli-obkbors-0/+70
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`
2020-12-30remove unused return types such as empty Results or Options that would ↵Matthias Krüger-6/+6
always be Some(..) 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()
2020-12-30where possible, pass slices instead of &Vec or &String (clippy::ptr_arg)Matthias Krüger-1/+1
2020-12-30Rollup merge of #80482 - matthiaskrgr:cl0ne_on_copy, r=jyn514Yuki Okushi-9/+9
don't clone copy types r? `@Dylan-DPC`
2020-12-30Rollup merge of #80477 - tmiasko:safe-forget, r=oli-obkYuki Okushi-16/+10
Make forget intrinsic safe
2020-12-30Rollup merge of #80472 - GuillaumeGomez:sans-serif-for-all-items-page, r=Nemo157Yuki Okushi-1/+3
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``
2020-12-30Rollup merge of #80465 - eltociear:patch-3, r=jyn514Yuki Okushi-1/+1
Fix typo in ffi-pure.md accesing -> accessing
2020-12-30Rollup merge of #80461 - rust-lang:tmandry-patch-1, r=Mark-SimulacrumYuki Okushi-1/+6
Add llvm-libunwind change to bootstrap CHANGELOG From #77703. This doesn't need a `changelog-seen` version bump because the old values aren't accepted anymore, meaning anyone who was using this had to change it already. r? ``@Mark-Simulacrum``
2020-12-30Rollup merge of #79812 - Aaron1011:lint-item-trailing-semi, r=oli-obkYuki Okushi-13/+29
Lint on redundant trailing semicolon after item We now lint on code like this: ```rust fn main() { fn foo() {}; struct Bar {}; } ``` Previously, this caused warnings in Cargo, so it was disabled.
2020-12-29Remove unnecessary semicolon from Clippy testAaron Hill-2/+2
2020-12-29Remove unnecessary semicolon from Rustdoc-generated codeAaron Hill-4/+4
2020-12-29Remove trailing semicolon in librustdocAaron Hill-1/+1
2020-12-29Lint on redundant trailing semicolon after itemAaron Hill-6/+22
We now lint on code like this: ```rust fn main() { fn foo() {}; struct Bar {}; } ``` Previously, this caused warnings in Cargo, so it was disabled.
2020-12-29Remove `compile-fail` test suiteVadim Petrochenkov-185/+506
2020-12-29don't clone copy typesMatthias Krüger-9/+9
2020-12-29Use sans-serif font for the "all items" page linksGuillaume Gomez-1/+3
2020-12-29test: updated expected Vec src pathC-4/+4
2020-12-29ci: stop producing gzip-compressed dist tarballsPietro Albini-0/+5
2020-12-29bootstrap: add the dist.compression-formats optionPietro Albini-1/+22
The option allows to add or remove compression formats used while producing dist tarballs.
2020-12-29Auto merge of #80014 - jyn514:box-item-kind, r=nnethercotebors-93/+93
[rustdoc] Box ItemKind to reduce the size of `Item` This brings the size of `Item` from ``` [src/librustdoc/lib.rs:103] std::mem::size_of::<Item>() = 536 ``` to ``` [src/librustdoc/lib.rs:103] std::mem::size_of::<Item>() = 136 ``` This is an alternative to https://github.com/rust-lang/rust/pull/79967; I don't think it makes sense to make both changes. Helps with #79103.
2020-12-29Add static assertion for the size of ItemKindJoshua Nelson-0/+4
2020-12-29Fix typo in ffi-pure.mdIkko Ashimine-1/+1
accesing -> accessing
2020-12-29Make forget intrinsic safeTomasz Miąsko-16/+10
2020-12-28Add llvm-libunwind change to bootstrap CHANGELOGTyler Mandry-1/+6
From #77703.
2020-12-28Improvements to NatVis supportArlie Davis-49/+71
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.
2020-12-28Rollup merge of #80419 - LeSeulArtichaut:80375-test-case, r=lcnrMara Bos-0/+15
Add regression test for #80375 This will also make sure that #80375 is handled if #79135 has to be reverted (which won't happen 🤞). Closes #80375. r? `@lcnr`
2020-12-28Rollup merge of #80410 - MarcoIeni:patch-1, r=jonas-schievinkMara Bos-1/+1
rustdoc book: fix example `lib.rs` file is created only if `--lib` flag is specified
2020-12-28Rollup merge of #80393 - ehuss:doc-git-link, r=jyn514Mara Bos-0/+6
Add links to the source for the rustc and rustdoc books. This adds a little icon in the upper-right corner of the books so that readers can find the source if they want to make changes or file issues. This is already included in several of the other books.
2020-12-28Rollup merge of #80434 - pietroalbini:tarball-temp-dir, r=Mark-SimulacrumDylan DPC-1/+1
bootstrap: put the component name in the tarball temp dir path This should not matter right now, but if we ever parallelize rustbuild this will avoid tarball contents being merged together. r? `@Mark-Simulacrum`