about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-11-16Also check for feature gates in "src/test/rustdoc"Guillaume Gomez-0/+1
(cherry picked from commit d7afbf61d87bf345597624cccdfb1036439697b9)
2021-11-16Split doc_cfg and doc_auto_cfg featuresGuillaume Gomez-5/+24
(cherry picked from commit d50a4753b8cffdb17e2d83282d95b61e266521fb)
2021-11-16Go back to loading all external crates unconditionallyJoshua Nelson-3/+36
This *continues* to cause regressions. This code will be unnecessary once access to the resolver happens fully before creating the tyctxt (#83761), so load all crates unconditionally for now. (cherry picked from commit 51345a83aaa99d1ec1a64e09c4e3280051e9cfa2)
2021-11-16Add more missing methods to `IntraLinkCrateLoader`Joshua Nelson-4/+57
This helps with (but does not fix) https://github.com/rust-lang/rust/issues/84738. I tested on https://github.com/jyn514/objr/commit/edcee7b8124abf0e4c63873e8422ff81beb11ebb and still hit ICEs. (cherry picked from commit cdafe9953938150b8ad296a472a8416d64d1b5ec)
2021-11-16add testsb-naber-0/+25
(cherry picked from commit 0199a81304fe7cf07f0d2c718a4243f47c1620ea)
2021-11-16Fix ICE when forgetting to `Box` a parameter to a `Self::func` callJakob Degen-0/+30
(cherry picked from commit 4b970231fd1254580fbddabab74a125404fea0de)
2021-11-16Add regresstion test for #90024.Jakob Degen-0/+37
Uses 2 MCVEs from the issue tracker that test opposite sides of the problem. (cherry picked from commit eae42fd9d0d6e568282a4c782405058b64f1ef0b)
2021-11-16Fix documentation header sizesJacob Hoffman-Andrews-11/+238
And add a rustdoc-gui test confirming various header sizes. (cherry picked from commit 89276ff7ede22f82ca3dd88305a41028e4ee62a2)
2021-11-15Revert "Do not call getpid wrapper after fork in tests"Josh Stone-35/+7
This reverts commit 12fbabd27f700a59d0e7031f0839b220c3514bcb. It was only needed because of using raw `clone3` instead of `fork`, but we only do that now when a pidfd is requested. (cherry picked from commit e96a0a8681998caf78093b65e746bfd967cb87e9)
2021-11-15Feature gate and make must_not_suspend allow-by-defaultGus Wynn-14/+111
This lint is not yet ready for stable use, primarily due to false positives in edge cases; we want to test it out more before stabilizing. (cherry picked from commit 185fa5625656c5a5cb979397b131d1c8bbadeba9)
2021-10-31Lint against RTL unicode codepoints in literals and commentsEsteban Küber-0/+231
Address CVE-2021-42574.
2021-10-21Bump cargoMark Rousskov-0/+0
Includes rust-lang/cargo#9979: Fix fetching git repos after a force push.
2021-10-21Rework the equivalent test to work with sidebar-items.jsLoïc BRANSTETT-3/+3
2021-10-21Add equivalent test in src/test/rustdocLoïc BRANSTETT-0/+14
2021-10-21Apply documentation suggestions from code reviewUrgau-3/+3
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2021-10-21Oops, inverted condition, fix thatLoïc BRANSTETT-1/+1
2021-10-21Add regression test for #89852Loïc BRANSTETT-0/+17
2021-10-21Deduplicate macro_rules! from module_exports when documenting themLoïc BRANSTETT-3/+11
This can append if within the same module a `#[macro_export] macro_rules!` is declared but also a reexport of itself producing two export of the same macro in the same module. In that case we only want to document it once.
2021-10-21Add a regression test for #89935Yuki Okushi-0/+18
2021-10-21Revert "Rollup merge of #86011 - tlyu:correct-sized-bound-spans, r=estebank"Yuki Okushi-67/+57
This reverts commit 36a1076d24697621a3bb67ef654b4eb79647aa54, reversing changes made to e1e9319d93aea755c444c8f8ff863b0936d7a4b6.
2021-10-21Fix issue 90038Gary Guo-0/+21
2021-10-21Update src/test/codegen/debug-vtable.rsWesley Wiser-1/+1
Co-authored-by: r00ster <r00ster91@protonmail.com>
2021-10-21Erase late-bound regions before computing vtable debuginfo name.Michael Woerister-0/+10
2021-10-18switch release channel to betaPietro Albini-1/+1
2021-10-17Auto merge of #89514 - davidtwco:polymorphize-shims-and-predicates, r=lcnrbors-1/+43
polymorphization: shims and predicates Supersedes #75737 and #75414. This pull request includes up some changes to polymorphization which hadn't landed previously and gets stage2 bootstrapping and the test suite passing when polymorphization is enabled. There are still issues with `type_id` and polymorphization to investigate but this should get polymorphization in a reasonable state to work on. - #75737 and #75414 both worked but were blocked on having the rest of the test suite pass (with polymorphization enabled) with and without the PRs. It makes more sense to just land these so that the changes are in. - #75737's changes remove the restriction of `InstanceDef::Item` on polymorphization, so that shims can now be polymorphized. This won't have much of an effect until polymorphization's analysis is more advanced, but it doesn't hurt. - #75414's changes remove all logic which marks parameters as used based on their presence in predicates - given #75675, this will enable more polymorphization and avoid the symbol clashes that predicate logic previously sidestepped. - Polymorphization now explicitly checks (and skips) foreign items, this is necessary for stage2 bootstrapping to work when polymorphization is enabled. - The conditional determining the emission of a note adding context to a post-monomorphization error has been modified. Polymorphization results in `optimized_mir` running for shims during collection where that wouldn't happen previously, some errors are emitted during `optimized_mir` and these were considered post-monomorphization errors with the existing logic (more errors and shims have a `DefId` coming from the std crate, not the local crate), adding a note that resulted in tests failing. It isn't particularly feasible to change where polymorphization runs or prevent it from using `optimized_mir`, so it seemed more reasonable to not change the conditional. - `characteristic_def_id_of_type` was being invoked during partitioning for self types of impl blocks which had projections that depended on the value of unused generic parameters of a function - this caused a ICE in a debuginfo test. If partitioning is enabled and the instance needs substitution then this is skipped. That test still fails for me locally, but not with an ICE, but it fails in a fresh checkout too, so 🤷‍♂️. r? `@lcnr`
2021-10-17Rollup merge of #89943 - matthiaskrgr:clpcompl, r=oli-obkYuki Okushi-6/+4
clippy::complexity fixes
2021-10-17Rollup merge of #89907 - GuillaumeGomez:correctly-emit-errors, r=camelidYuki Okushi-1/+0
Remove FIXME since there is nothing to be fixed Resolves #88593. The errors are deduplicated when displayed to users. They only appear multiple times in UI tests. cc ``@jyn514`` r? ``@camelid``
2021-10-17Rollup merge of #89886 - alexcrichton:update-wasi-libc, r=kennytmYuki Okushi-1/+1
Update the wasi-libc built with the wasm32-wasi target This commit updates the wasi-libc that we include with the wasm32-wasi target, which brings in various misc fixes such as musl updates and some math tweaks.
2021-10-17Rollup merge of #89849 - rusticstuff:remove-xcode-select, r=Mark-SimulacrumYuki Okushi-18/+0
CI: Selecting the Xcode version no longer needed with the macos-11 runners. It does nothing nowadays since `/Applications/Xcode_12.2.app` does not exist in the GH runner environment and automatically using the latest version selected by the GH environment is better anyway.
2021-10-16Remove FIXME since there is nothing to be fixed.Guillaume Gomez-1/+0
The errors are deduplicated when displayed to users. They only appear multiple times in UI tests.
2021-10-16Auto merge of #89860 - camsteffen:macro-semi, r=petrochenkovbors-684/+701
Remove trailing semicolon from macro call span Macro call site spans are now less surprising/more consistent since they no longer contain a semicolon after the macro call. The downside is that we need to do a little guesswork to get the semicolon in diagnostics. But this should not be noticeable since it is rare for the semicolon to not immediately follow the macro call.
2021-10-16clippy::complexity changesMatthias Krüger-6/+4
2021-10-16Rollup merge of #89918 - JohnTitor:gats-tests, r=jackh726Matthias Krüger-0/+55
Add some GATs related regression tests Closes #88287, closes #88405
2021-10-16Rollup merge of #89914 - jackh726:gat_genericboundfailure, r=estebankMatthias Krüger-16/+19
Emit impl difference error for GenericBoundFailure too Fixes #86787 r? ````@estebank````
2021-10-16Rollup merge of #89912 - davidtwco:issue-89280-split-lines-multiple-lines, ↵Matthias Krüger-0/+33
r=oli-obk emitter: current substitution can be multi-line Fixes #89280. In `splice_lines`, there is some arithmetic to compute the required alignment such that future substitutions in a suggestion are aligned correctly. However, this assumed that the current substitution's span was only on a single line. In circumstances where this was not true, it could result in a arithmetic overflow when the substitution's end column was less than the substitution's start column. r? ````@oli-obk````
2021-10-16Rollup merge of #89906 - ↵Matthias Krüger-1/+4
yuvaldolev:move-format-version-to-rustdoc-json-types, r=CraftSpider Moved format-version constant to rustdoc-json-types Addresses #88620 Moved format-version constant from rustdoc to rustdoc-json-types.
2021-10-16Rollup merge of #89902 - rusticstuff:outline-atomics-linux-only, ↵Matthias Krüger-0/+1
r=workingjubilee Restrict the aarch64 outline atomics test to Linux The test was introduced in #83655, which enables the `outline-atomics` feature for aarch64-unknown-linux-* but not for any other aarch64 targets. The test did not check for Linux causing test failures on aarch64-apple-darwin. r? `@workingjubilee`
2021-10-16Rollup merge of #89509 - jhpratt:stabilize-const_unreachable_unchecked, ↵Matthias Krüger-8/+5
r=oli-obk Stabilize `unreachable_unchecked` as `const fn` Closes #53188 This PR stabilizes `core::hint::unreachable_unchecked` as `const fn`. MIRI is able to detect when this method is called. Stabilization was delayed until `const_panic` was stabilized so as to avoid users calling this method in its place (thus resulting in runtime UB). With #89508, that is no longer an issue. ````@rustbot```` label +A-const-eval +A-const-fn +T-lang +S-blocked (not sure why it's T-lang, but that's what the tracking issue is)
2021-10-15Auto merge of #84096 - m-ou-se:windows-bcrypt-random, r=dtolnaybors-2/+2
Use BCryptGenRandom instead of RtlGenRandom on Windows. This removes usage of RtlGenRandom on Windows, in favour of BCryptGenRandom. BCryptGenRandom isn't available on XP, but we dropped XP support a while ago.
2021-10-16Add some GATs related regression testsYuki Okushi-0/+55
2021-10-15Emit impl difference error for GenericBoundFailure toojackh726-16/+19
2021-10-15emitter: current substitution can be multi-lineDavid Wood-0/+33
In `splice_lines`, there is some arithmetic to compute the required alignment such that future substitutions in a suggestion are aligned correctly. However, this assumed that the current substitution's span was only on a single line. In circumstances where this was not true, it could result in a arithmetic overflow when the substitution's end column was less than the substitution's start column. Signed-off-by: David Wood <david.wood@huawei.com>
2021-10-15Add missing bcrypt.lib to make-fulldeps Makefile.Mara Bos-2/+2
2021-10-15Moved format-version constant to rustdoc-json-typesYuval Dolev-1/+4
2021-10-15Fix clippy with changed macro statement spansCameron Steffen-130/+126
2021-10-15Bless testsCameron Steffen-554/+575
2021-10-15Auto merge of #89903 - matthiaskrgr:rollup-s0c69xl, r=matthiaskrgrbors-74/+111
Rollup of 7 pull requests Successful merges: - #86011 (move implicit `Sized` predicate to end of list) - #89821 (Add a strange test for `unsafe_code` lint.) - #89859 (add dedicated error variant for writing the discriminant of an uninhabited enum variant) - #89870 (Suggest Box::pin when Pin::new is used instead) - #89880 (Use non-checking TLS relocation in aarch64 asm! sym test.) - #89885 (add long explanation for E0183) - #89894 (Remove unused dependencies from rustc_const_eval) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-10-15Rollup merge of #89885 - cameron1024:long-explanation-E0183, r=GuillaumeGomezMatthias Krüger-3/+4
add long explanation for E0183 Addresses #61137
2021-10-15Rollup merge of #89880 - adamgemmell:dev/nc-relocation, r=AmanieuMatthias Krüger-1/+1
Use non-checking TLS relocation in aarch64 asm! sym test. The checking variant ensures that the offset required is not larger than 12 bits - hence we wouldn't ever need the upper 12 bits. It's unlikely to ever fail in this small test but this is technically correct. This was noticed incidentally when we found that LLD doesn't support the `tprel_lo12` relocation, even though LLVM can apparently generate it when using `-mtls-size=12`.
2021-10-15Rollup merge of #89870 - tmandry:box-pin, r=estebankMatthias Krüger-13/+7
Suggest Box::pin when Pin::new is used instead This fixes an incorrect diagnostic. **Based on #89390**; only the last commit is specific to this PR. "Ignore whitespace changes" also helps here.