about summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2019-03-27Auto merge of #55780 - ogoffart:span_source_text, r=petrochenkovbors-2/+43
Introduce proc_macro::Span::source_text A function to extract the actual source behind a Span. Background: I would like to use `syn` in a `build.rs` script to parse the rust code, and extract part of the source code. However, `syn` only gives access to proc_macro2::Span, and i would like to get the source code behind that. I opened an issue on proc_macro2 bug tracker for this feature https://github.com/alexcrichton/proc-macro2/issues/110 and @alexcrichton said the feature should first go upstream in proc_macro. So there it is! Since most of the Span API is unstable anyway, this is guarded by the same `proc_macro_span` feature as everything else.
2019-03-26fix some uses I missedRalf Jung-3/+3
2019-03-23syntax: Remove warning for unnecessary path disambiguatorsVadim Petrochenkov-42/+6
2019-03-23fs::copy() set file mode earlyHarald Hoyer-4/+9
A convenience method like fs::copy() should try to prevent pitfalls a normal user doesn't think about. In case of an empty umask, setting the file mode early prevents temporarily world readable or even writeable files, because the default mode is 0o666. In case the target is a named pipe or special device node, setting the file mode can lead to unwanted side effects, like setting permissons on `/dev/stdout` or for root setting permissions on `/dev/null`. copy_file_range() returns EINVAL, if the destination is a FIFO/pipe or a device like "/dev/null", so fallback to io::copy, too. Use `fcopyfile` on MacOS instead of `copyfile`. Fixes: https://github.com/rust-lang/rust/issues/26933 Fixed: https://github.com/rust-lang/rust/issues/37885
2019-03-23resolve: collect trait aliases along with traitsSean McArthur-0/+23
2019-03-16Rollup merge of #59206 - sntdevco:master, r=dtolnaykennytm-4/+4
Improved test output
2019-03-16Rollup merge of #59201 - lambda:remove-repr-simd-isize-usize-restriction, ↵kennytm-0/+32
r=alexcrichton Remove restriction on isize/usize in repr(simd) As discussed in #55078, there's no known reason for this restriction. It's unlikely that repr(simd) will be stabilized in its current form, but might as well remove some restrictions on it. This removes the branch in `is_machine` which returns false for these types. `is_machine` is only used for the repr(simd) type validation check.
2019-03-16Rollup merge of #59156 - davidtwco:issue-55809, r=nikomatsakiskennytm-0/+30
[wg-async-await] Add regression test for #55809. Fixes #55809. This PR adds a regression test for #55809 which checks that a overflow does not occur when evaluating a requirement for async functions and `&mut` arguments in some specific circumstances.
2019-03-16Rollup merge of #59025 - aoikonomopoulos:issue-57924, r=varkorkennytm-0/+9
Fix generic argument lookup for Self Rewrite the SelfCtor early and use the replacement Def when calculating the path_segs. Note that this also changes which def is seen by the code that computes user_self_ty and is_alias_variant_ctor; I don't see a immediate issue with that, but I'm not 100% clear on the implications. Fixes #57924 r? @eddyb
2019-03-15Remove restriction on isize/usize in repr(simd)Brian Campbell-0/+32
As discussed in #55078, there's no known reason for this restriction. It's unlikely that repr(simd) will be stabilized in its current form, but might as well remove some restrictions on it. This removes the branch in `is_machine` which returns false for these types. `is_machine` is only used for the repr(simd) type validation check.
2019-03-15Improved test output for estr-slicesntdevco-4/+4
2019-03-14Moved issue tests to subdirs and normalised names.Alexander Regueiro-49/+56
2019-03-13Fix generic argument lookup for SelfAngelos Oikonomopoulos-0/+9
Rewrite the SelfCtor early and use the replacement Def when calculating the path_segs. Note that this also changes which def is seen by the code that computes user_self_ty and is_alias_variant_ctor; I don't see a immediate issue with that, but I'm not 100% clear on the implications. Fixes #57924
2019-03-13Add test for #55809.David Wood-0/+30
This commit adds a regression test for #55809 which checks that a overflow does not occur when evaluating a requirement for async functions and `&mut` arguments in some specific circumstances.
2019-03-09Rollup merge of #58750 - TimDiekmann:master, r=oli-obkMazdak Farrokhzad-0/+32
Make `Unique::as_ptr`, `NonNull::dangling` and `NonNull::cast` const
2019-03-08Rollup merge of #58918 - gilescope:async-await-issue-testcase, r=petrochenkovPietro Albini-0/+28
Regression test added for an async ICE. Regression test for #57084 (as suggested in issue).
2019-03-08Rollup merge of #58911 - pnkfelix:issue-58435-regression-test, r=alexcrichtonPietro Albini-0/+17
Regression test for #58435. Fix #58435
2019-03-08Rollup merge of #58906 - Nemo157:generator-state-debug-info, r=ZoxcPietro Albini-0/+27
Monomorphize generator field types for debuginfo Fixes #58888 r? @Zoxc
2019-03-08Rollup merge of #58369 - nox:sync-hash-map-entry, r=AmanieuPietro Albini-0/+1
Make the Entry API of HashMap<K, V> Sync and Send Fixes #45219
2019-03-06Desugared asyncs into generators and minimised.Giles Cope-12/+13
2019-03-05Removed whitespaceGiles Cope-1/+1
2019-03-05Unrolled await macro.Giles Cope-6/+6
Was then able to the minimise the reproduction a little further.
2019-03-04Regression test added for an async ICE.Giles Cope-0/+27
2019-03-04Regression test for #58435.Felix S. Klock II-0/+17
2019-03-04Make the Entry API of HashMap<K, V> Sync and Send (fixes #45219)Anthony Ramine-0/+1
2019-03-04Monomorphize generator field types for debuginfoWim Looman-0/+27
2019-02-28Make `Unique::as_ptr`, `NonNull::dangling` and `NonNull::cast` constTim-0/+32
Make `Unique::as_ptr` const without feature attribute as it's unstable Make `NonNull::dangling` and `NonNull::cast` const with `feature = "const_ptr_nonnull"`
2019-02-26Normalize the type Self resolves to in an implAngelos Oikonomopoulos-0/+13
This is required at the very least in order to evaluate associated constants for arrays (see #58212).
2019-02-25Auto merge of #57367 - petrochenkov:unrestab, r=Centrilbors-2/+0
Stabilize `unrestricted_attribute_tokens` In accordance with a plan described in https://internals.rust-lang.org/t/unrestricted-attribute-tokens-feature-status/8561/3. Delimited non-macro non-builtin attributes now support the same syntax as macro attributes: ``` PATH PATH `(` TOKEN_STREAM `)` PATH `[` TOKEN_STREAM `]` PATH `{` TOKEN_STREAM `}` ``` Such attributes mostly serve as inert proc macro helpers or tool attributes. To some extent these attributes are de-facto stable due to a hole in feature gate checking (feature gating is done too late - after macro expansion.) So if macro *removes* such helper attributes during expansion (and it must remove them, unless it's a derive macro), then the code will work on stable. Key-value non-macro non-builtin attributes are now restricted to bare minimum required to support what we support on stable - unsuffixed literals (https://github.com/rust-lang/rust/issues/34981). ``` PATH `=` LITERAL ``` (Key-value macro attributes are not supported at all right now.) Crater run in https://github.com/rust-lang/rust/pull/57321 found no regressions for this change. There are multiple possible ways to extend key-value attributes (https://github.com/rust-lang/rust/pull/57321#issuecomment-451574065), but I'd expect an RFC for that and it's not a pressing enough issue to block stabilization of delimited attributes. Built-in attributes are still restricted to the "classic" meta-item syntax, nothing changes here. https://github.com/rust-lang/rust/pull/57321 goes further and adds some additional restrictions (more consistent input checking) to built-in attributes. Closes https://github.com/rust-lang/rust/issues/55208
2019-02-25Auto merge of #58302 - SimonSapin:tryfrom, r=alexcrichtonbors-4/+3
Stabilize TryFrom and TryInto with a convert::Infallible empty enum This is the plan proposed in https://github.com/rust-lang/rust/issues/33417#issuecomment-423073898
2019-02-25Stabilize `unrestricted_attribute_tokens`Vadim Petrochenkov-2/+0
2019-02-25Test that binop subtyping in rustc_typeck fixes #27949Jamie Turner-0/+41
2019-02-24Auto merge of #58304 - gnzlbg:simd_saturated, r=nagisabors-0/+92
Add generic simd saturated add/sub intrinsics r? @eddyb
2019-02-22Rollup merge of #58059 - RalfJung:before_exec, r=alexcrichtonMazdak Farrokhzad-83/+115
deprecate before_exec in favor of unsafe pre_exec Fixes https://github.com/rust-lang/rust/issues/39575 As per the [lang team decision](https://github.com/rust-lang/rust/issues/39575#issuecomment-442993358): > The language team agreed that before_exec should be unsafe, and leaves the details of a transition plan to the libs team. Cc @alexcrichton @rust-lang/libs how would you like to proceed?
2019-02-20Rollup merge of #58044 - Lokathor:lokathor, r=alexcrichtonkennytm-0/+12
Make overflowing and wrapping negation const Remember that the signed and unsigned versions are slightly different here, so there's four functions made const instead of just two.
2019-02-13Stabilize TryFrom and TryIntoSimon Sapin-2/+1
2019-02-13Use convert::Infallible instead of never in the blanket TryFrom implSimon Sapin-2/+2
2019-02-12Merging masterMatthias Einwag-21/+166
2019-02-12Auto merge of #58051 - SimonSapin:str_escape, r=alexcrichtonbors-3/+0
Stabilize str::escape_* methods with new return types… … that implement `Display` and `Iterator<Item=char>`, as proposed in FCP: https://github.com/rust-lang/rust/issues/27791#issuecomment-376864727
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-7/+7
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-12Stabilize str::escape_* methodsSimon Sapin-3/+0
FCP: https://github.com/rust-lang/rust/issues/27791#issuecomment-376864727
2019-02-12Auto merge of #58246 - pmccarter:master, r=oli-obkbors-0/+34
Make `saturating_add` and `saturating_sub` `const` functions Fixes #58030
2019-02-11rename variable and add test directive for #58030Patrick McCarter-0/+1
2019-02-10tests: doc commentsAlexander Regueiro-7/+7
2019-02-10Auto merge of #58129 - RalfJung:maybe-uninit, r=cramertjbors-3/+3
MaybeUninit: some docs, rename into_inner -> into_initialized, return &mut from set
2019-02-09Auto merge of #57885 - arielb1:xform-probe, r=nikomatsakisbors-0/+59
Avoid committing to autoderef in object method probing This fixes the "leak" introduced in #57835 (see test for details, also apparently #54252 had no tests for the "leaks" that were fixed in it, so go ahead and add one). Maybe beta-nominating because regression, but I'm against landing things on beta we don't have to. r? @nikomatsakis
2019-02-08Remove trailing white-spacegnzlbg-1/+1
2019-02-08simd-saturating-arith test requires LLVM >= 8.0gnzlbg-3/+3
2019-02-08Add simd_saturating_{add,sub} intrinsicsgnzlbg-0/+92
2019-02-07fix existing testsmark-8/+8