about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-01-23Rollup merge of #81288 - camelid:fix-trait-item-vis, r=jyn514Jonas Schievink-2/+51
rustdoc: Fix visibility of trait and impl items Fixes #81274. r? `@jyn514`
2021-01-23Rollup merge of #81275 - jyn514:time-render, r=wesleywiserJonas Schievink-14/+32
Fix <unknown> queries and add more timing info to render_html Closes https://github.com/rust-lang/rust/issues/81251. ## Fix `<unknown>` queries This happened because `alloc_query_strings` was never called. ## Add more timing info to render_html This still has some issues I'm not sure how to work out: - `create_renderer` and `renderer_after_krate` aren't shown by default. I want something like `verbose_generic_activity_with_arg`, but it doesn't exist. I'm also not sure how to show activities that aren't on by default - I tried `-Z self-profile -Z self-profile-args=all`, but it didn't show up. r? `@wesleywiser`
2021-01-23Rollup merge of #81249 - cjgillot:issue-79537, r=oli-obkJonas Schievink-0/+68
Lower closure prototype after its body. Fixes #79537. r? `@Mark-Simulacrum`
2021-01-23Rollup merge of #81245 - ehuss:update-cargo, r=ehussJonas Schievink-0/+0
Update cargo 5 commits in a73e5b7d567c3036b296fc6b33ed52c5edcd882e..783bc43c660bf39c1e562c8c429b32078ad3099b 2021-01-12 23:45:39 +0000 to 2021-01-20 19:02:26 +0000 - Fix some issues with `cargo doc` and the new feature resolver. (rust-lang/cargo#9077) - Implement support for rust-version field in project metadata (rust-lang/cargo#8037) - Fix a bug in Cargo's cyclic dep graph detection (rust-lang/cargo#9075) - Typo correction: artifcats -&gt; artifacts (rust-lang/cargo#9081) - Remove stray backtick from doc (rust-lang/cargo#9079)
2021-01-23Rollup merge of #81243 - osa1:fix_80742_2, r=RalfJungJonas Schievink-3/+31
mir: Improve size_of handling when arg is unsized As discussed on Zulip with `@RalfJung.`
2021-01-23Calculate self-profile strings in `Compiler::enter` instead in codegenJoshua Nelson-6/+3
This avoids each tool having to separately find and call `self_profile_alloc_strings`. - Don't compute the global context if it hasn't yet been computed This avoids giving extraneous errors about unresolved names if an error occurs during parsing.
2021-01-23Add more timing info to render_htmlJoshua Nelson-13/+31
- Show `create_renderer` and `renderer_after_crate` by default - Don't rewrite `extra_verbose_generic_activity`
2021-01-23Auto merge of #80579 - RalfJung:no-fallible-promotion, r=oli-obkbors-281/+238
avoid promoting division, modulo and indexing operations that could fail For division, `x / y` will still be promoted if `y` is a non-zero integer literal; however, `1/(1+1)` will not be promoted any more. While at it, also see if we can reject promoting floating-point arithmetic (which are [complicated](https://github.com/rust-lang/unsafe-code-guidelines/issues/237) so maybe we should not promote them). This will need a crater run to see if there's code out there that relies on these things being promoted. If we can land this, promoteds in `fn`/`const fn` cannot fail to evaluate any more, which should let us do some simplifications in codegen/Miri! Cc https://github.com/rust-lang/rfcs/pull/3027 Fixes https://github.com/rust-lang/rust/issues/61821 r? `@oli-obk`
2021-01-23Auto merge of #80065 - b-naber:parse-angle-arg-diagnostics, r=petrochenkovbors-38/+141
Improve diagnostics when parsing angle args https://github.com/rust-lang/rust/pull/79266 introduced parsing of generic arguments in associated type constraints, this however resulted in possibly very confusing error messages in cases in which closing angle brackets were missing such as in `Vec<(u32, _, _) = vec![]`, which outputs an incorrectly parsed equality constraint error, as noted by `@cynecx.` This PR tries to provide better error messages in such cases. r? `@petrochenkov`
2021-01-22rustdoc: Fix visibility of trait and impl itemsCamelid-2/+51
2021-01-22Fix <unknown> queriesJoshua Nelson-2/+5
This happened because `alloc_query_strings` was never called.
2021-01-22Auto merge of #72160 - slo1:libstd-setgroups, r=KodrAusbors-0/+26
Add setgroups to std::os::unix::process::CommandExt Should fix #38527. I'm not sure groups is the greatest name though.
2021-01-22bless testsb-naber-1/+1
2021-01-22add and update testsb-naber-38/+141
2021-01-22Auto merge of #81271 - m-ou-se:rollup-xv7gq3w, r=m-ou-sebors-163/+416
Rollup of 10 pull requests Successful merges: - #80573 (Deny rustc::internal lints for rustdoc and clippy) - #81173 (Expand docs on Iterator::intersperse) - #81194 (Stabilize std::panic::panic_any.) - #81202 (Don't prefix 0x for each segments in `dbg!(Ipv6)`) - #81225 (Make 'docs' nullable in rustdoc-json output) - #81227 (Remove doctree::StructType) - #81233 (Document why not use concat! in dbg! macro) - #81236 (Gracefully handle loop labels missing leading `'` in different positions) - #81241 (Turn alloc's force_expr macro into a regular macro_rules.) - #81242 (Enforce statically that `MIN_NON_ZERO_CAP` is calculated at compile time) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-01-22Rollup merge of #81236 - estebank:everybody-loop-now, r=oli-obkMara Bos-76/+349
Gracefully handle loop labels missing leading `'` in different positions Fix #81192. * Account for labels when suggesting `loop` instead of `while true` * Suggest `'a` when given `a` only when appropriate * Add loop head span to hir * Tweak error for invalid `break expr` * Add more misspelled label tests * Avoid emitting redundant "unused label" lint * Parse loop labels missing a leading `'` Each commit can be reviewed in isolation.
2021-01-22Rollup merge of #81227 - CraftSpider:struct-type-clean, r=jyn514Mara Bos-53/+24
Remove doctree::StructType Also removes it from the Union type, as unions can only ever be 'Plain'. Adds a new StructType to JSON, 'union', as the easiest way to encode the type of a union there. This leaves only one item in doctree, `Module`. r? `@jyn514`
2021-01-22Rollup merge of #81225 - CraftSpider:json-opt-docs, r=jyn514Mara Bos-4/+5
Make 'docs' nullable in rustdoc-json output Matches the backing better, and makes it so there's a difference between 'empty docs' and 'no docs'.
2021-01-22Rollup merge of #80573 - jyn514:tool-lints, r=GuillaumeGomezMara Bos-30/+38
Deny rustc::internal lints for rustdoc and clippy - Fix rustc::internal lints for rustdoc - Deny internal lints only for rustdoc and clippy (previously the lints were ignored for clippy because -Zunstable-options didn't get passed)
2021-01-22Auto merge of #81101 - tmiasko:combine-now, r=nagisabors-70/+1
Combine instructions immediately
2021-01-22Auto merge of #80558 - lcnr:gat-variance, r=matthewjasperbors-0/+24
require gat substs to be invariant fixes #69184, fixes #80766 r? `@matthewjasper` probably
2021-01-22re-bless ui testsRalf Jung-53/+5
2021-01-22expand successful-promotion test a bitRalf Jung-16/+18
2021-01-22do promote array indexing if we know it is in-boundsRalf Jung-44/+47
2021-01-22avoid promoting division, modulo and indexing operations that could failRalf Jung-278/+278
2021-01-21Update src/test/ui/command/command-setgroups.rs to ignore windowsslo1-0/+1
2021-01-21Update src/test/ui/command/command-setgroups.rsslo1-0/+6
Co-authored-by: Ashley Mannix <kodraus@hey.com>
2021-01-21Add setgroups to std::os::unix::process::CommandExtslo1-0/+19
2021-01-22Auto merge of #81135 - jyn514:no-backticks, r=flip1995bors-39/+39
Fix formatting for removed lints - Don't add backticks for the reason a lint was removed. This is almost never a code block, and when it is the backticks should be in the reason itself. - Don't assume clippy is the only tool that needs to be checked for backwards compatibility I split this out of https://github.com/rust-lang/rust/pull/80527/ because it kept causing tests to fail, and it's a good change to have anyway. r? `@flip1995`
2021-01-21Do not suggest using a break label when one is already presentEsteban Küber-18/+6
2021-01-21Fix clippy and commentEsteban Küber-6/+6
2021-01-21Parse loop labels missing a leading `'`Esteban Küber-17/+22
When encountering the following typo: ```rust a: loop { break 'a; } ``` provide an appropriate suggestion.
2021-01-21Avoid emitting redundant "unused label" lintEsteban Küber-63/+17
2021-01-21Add more misspelled label testsEsteban Küber-15/+173
2021-01-21Tweak error for invalid `break expr`Esteban Küber-55/+119
Point at loop head on invalid `break expr`. Suggest removing `expr` or using label if available.
2021-01-21Add loop head span to hirEsteban Küber-6/+6
2021-01-21Suggest `'a` when given `a` only when appropriateEsteban Küber-21/+27
When encountering a name `a` that isn't resolved, but a label `'a` is found in the current ribs, only suggest `'a` if this name is the value expression of a `break` statement. Solve FIXME.
2021-01-21Account for labels when suggesting `loop` instead of `while true`Esteban Küber-9/+107
2021-01-21Deny internal lints for rustdocJoshua Nelson-0/+8
2021-01-21Fix rustc::internal lints on rustdocJoshua Nelson-30/+30
2021-01-22Auto merge of #81177 - Aaron1011:fix/force-capture-tokens, r=petrochenkovbors-2/+134
Force token collection to run when parsing nonterminals Fixes #81007 Previously, we would fail to collect tokens in the proper place when only builtin attributes were present. As a result, we would end up with attribute tokens in the collected `TokenStream`, leading to duplication when we attempted to prepend the attributes from the AST node. We now explicitly track when token collection must be performed due to nomterminal parsing.
2021-01-21Bump format versionRune Tynan-1/+1
2021-01-21Lower closure prototype after its body.Camille GILLOT-0/+68
2021-01-21mir: Improve size_of handling when arg is unsizedÖmer Sinan Ağacan-3/+31
2021-01-21Update cargoEric Huss-0/+0
2021-01-21require gat substs to be invariantBastian Kauschke-0/+24
2021-01-21Auto merge of #81240 - JohnTitor:rollup-ieaz82a, r=JohnTitorbors-27/+170
Rollup of 11 pull requests Successful merges: - #79655 (Add Vec visualization to understand capacity) - #80172 (Use consistent punctuation for 'Prelude contents' docs) - #80429 (Add regression test for mutual recursion in obligation forest) - #80601 (Improve grammar in documentation of format strings) - #81046 (Improve unknown external crate error) - #81178 (Visit only terminators when removing landing pads) - #81179 (Fix broken links with `--document-private-items` in the standard library) - #81184 (Remove unnecessary `after_run` function) - #81185 (Fix ICE in mir when evaluating SizeOf on unsized type) - #81187 (Fix typo in counters.rs) - #81219 (Document security implications of std::env::temp_dir) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-01-21Rollup merge of #81185 - osa1:fix_80742, r=oli-obkYuki Okushi-0/+75
Fix ICE in mir when evaluating SizeOf on unsized type Not quite ready yet. This tries to fix #80742 as discussed on [Zulip topic][1], by using `delay_span_bug`. I don't understand what `delay_span_bug` does. It seems like my error message is never used. With this patch, in this program: ```rust #![allow(incomplete_features)] #![feature(const_evaluatable_checked)] #![feature(const_generics)] use std::fmt::Debug; use std::marker::PhantomData; use std::mem::size_of; struct Inline<T> where [u8; size_of::<T>() + 1]: , { _phantom: PhantomData<T>, buf: [u8; size_of::<T>() + 1], } impl<T> Inline<T> where [u8; size_of::<T>() + 1]: , { pub fn new(val: T) -> Inline<T> { todo!() } } fn main() { let dst = Inline::<dyn Debug>::new(0); // line 27 } ``` these errors are printed, both for line 27 (annotated line above): - "no function or associated item named `new` found for struct `Inline<dyn Debug>` in the current scope" - "the size for values of type `dyn Debug` cannot be known at compilation time" Second error makes sense, but I'm not sure about the first one and why it's even printed. Finally, I'm not sure about the span passing in `const_eval`. [1]: https://rust-lang.zulipchat.com/#narrow/stream/269128-miri/topic/Help.20fixing.20.2380742
2021-01-21Rollup merge of #81184 - jyn514:combine-after, r=CraftSpiderYuki Okushi-23/+30
Remove unnecessary `after_run` function It's called at the same time and in the same place as `after_krate`, so they can be combined.
2021-01-21Rollup merge of #81046 - rylev:unknown-external-crate, r=estebankYuki Okushi-4/+34
Improve unknown external crate error This improves error messages when unknown items in the crate root are encountered. Fixes #63799 r? ```@estebank```