Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize the type_name intrinsic in core::any #60066

Merged
merged 1 commit into from Jul 26, 2019

Conversation

@sfackler
Copy link
Member

commented Apr 18, 2019

Stabilize type_name in core::any.

Closes rust-lang/rfcs#1428

FCP completed over there.

RELEASES.md: Prefer T-libs for categorization.

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

commented Apr 18, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:0164d40f:start=1555555460697551711,finish=1555555461469736846,duration=772185135
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[00:04:44]     |
[00:04:44] 468 |     intrinsics::type_name::<T>()
[00:04:44]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[00:04:44]     |
[00:04:44]     = note: consult the function's documentation for information on how to avoid undefined behavior
[00:04:44] error: aborting due to previous error
[00:04:44] 
[00:04:44] For more information about this error, try `rustc --explain E0133`.
[00:04:44] error: Could not compile `core`.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@sfackler sfackler force-pushed the sfackler:type-name branch from b60176c to 1ad4605 Apr 18, 2019

@Centril

This comment was marked as resolved.

Copy link
Member

commented Apr 18, 2019

Marked as blocked on outcome in rust-lang/rfcs#1428.

@alexcrichton

This comment was marked as resolved.

Copy link
Member

commented Apr 18, 2019

@SimonSapin or @sfackler, would one of y'all be able to follow up on the plan proposed here?

@sfackler

This comment was marked as resolved.

Copy link
Member Author

commented Apr 19, 2019

I just responded.

@oli-obk What do I need to change to make type_name have consistent output?

@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

commented Apr 20, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:0abf92eb:start=1555725403920013287,finish=1555725491333400019,duration=87413386732
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---

[00:03:40] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:03:40] tidy error: /checkout/src/libcore/tests/any.rs:121: line longer than 100 chars
[00:03:41] some tidy checks failed
[00:03:41] 
[00:03:41] 
[00:03:41] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:03:41] 
[00:03:41] 
[00:03:41] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:41] Build completed unsuccessfully in 0:00:50
[00:03:41] Build completed unsuccessfully in 0:00:50
[00:03:41] make: *** [tidy] Error 1
[00:03:41] Makefile:67: recipe for target 'tidy' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:03ff4698
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sat Apr 20 02:02:02 UTC 2019
---
travis_time:end:27e675c9:start=1555725723727794967,finish=1555725723733222927,duration=5427960
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:11ba4ae4
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:04300107
travis_time:start:04300107
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:19a22c7e
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

src/libcore/any.rs Outdated Show resolved Hide resolved
src/libcore/any.rs Show resolved Hide resolved
@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

commented Apr 20, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:07c1ff0d:start=1555774337768260839,finish=1555774427672168973,duration=89903908134
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[00:25:07]    Compiling crossbeam-deque v0.2.0
[00:25:08] error: unnecessary `unsafe` block
[00:25:08]    --> src/libserialize/serialize.rs:839:16
[00:25:08]     |
[00:25:08] 839 |                unsafe { intrinsics::type_name::<S>() },
[00:25:08]     |
[00:25:08]     = note: `-D unused-unsafe` implied by `-D warnings`
[00:25:08] 
[00:25:08] error: unnecessary `unsafe` block
[00:25:08] error: unnecessary `unsafe` block
[00:25:08]    --> src/libserialize/serialize.rs:841:16
[00:25:08]     |
[00:25:08] 841 |                unsafe { intrinsics::type_name::<T>() },
[00:25:08] 
[00:25:08] error: aborting due to 2 previous errors
[00:25:08] 
[00:25:08] error: Could not compile `serialize`.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors

This comment was marked as resolved.

Copy link
Contributor

commented May 30, 2019

☔️ The latest upstream changes (presumably #61203) made this pull request unmergeable. Please resolve the merge conflicts.

@Centril

This comment was marked as resolved.

Copy link
Member

commented Jun 16, 2019

Looks like we have an ICE in #61894

@pnkfelix pnkfelix referenced this pull request Jun 20, 2019

@Centril Centril added this to the 1.38 milestone Jul 21, 2019

@Centril

This comment has been minimized.

Copy link
Member

commented Jul 25, 2019

To reduce Alex's review backlog... :)

r? @Centril

src/libcore/any.rs Outdated Show resolved Hide resolved
src/libcore/any.rs Outdated Show resolved Hide resolved
src/libcore/any.rs Outdated Show resolved Hide resolved
src/libcore/any.rs Outdated Show resolved Hide resolved
@sfackler

This comment has been minimized.

Copy link
Member Author

commented Jul 25, 2019

Rebased!

@sfackler sfackler force-pushed the sfackler:type-name branch from e98350b to 91fa898 Jul 25, 2019

@Centril
Copy link
Member

left a comment

r=me rollup when green

@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

commented Jul 25, 2019

@bors r=Centril rollup

@bors

This comment has been minimized.

Copy link
Contributor

commented Jul 25, 2019

📌 Commit 91fa898 has been approved by Centril

Centril added a commit to Centril/rust that referenced this pull request Jul 25, 2019

Rollup merge of rust-lang#60066 - sfackler:type-name, r=Centril
Stabilize the type_name intrinsic in core::any

Stabilize `type_name` in `core::any`.

Closes rust-lang/rfcs#1428

FCP completed over there.

`RELEASES.md`: Prefer T-libs for categorization.

bors added a commit that referenced this pull request Jul 25, 2019

Auto merge of #62990 - Centril:rollup-k9n0hvs, r=Centril
Rollup of 15 pull requests

Successful merges:

 - #60066 (Stabilize the type_name intrinsic in core::any)
 - #60938 (rustdoc: make #[doc(include)] relative to the containing file)
 - #61884 (Stablize Euclidean Modulo (feature euclidean_division))
 - #61890 (Fix some sanity checks)
 - #62528 (Add joining slices of slices with a slice separator, not just a single item)
 - #62707 (Add tests for overlapping explicitly dropped locals in generators)
 - #62735 (Turn `#[global_allocator]` into a regular attribute macro)
 - #62822 (Improve some pointer-related documentation)
 - #62887 (Make the parser TokenStream more resilient after mismatched delimiter recovery)
 - #62921 (Add method disambiguation help for trait implementation)
 - #62930 (Add test for #51559)
 - #62942 (Use match ergonomics in Condvar documentation)
 - #62977 (Fix inconsistent highlight blocks.)
 - #62978 (Remove `cfg(bootstrap)` code for array implementations)
 - #62981 (Add note suggesting to borrow a String argument to find)

Failed merges:

 - #62964 (clarify and unify some type test names)

r? @ghost

@bors bors merged commit 91fa898 into rust-lang:master Jul 26, 2019

4 checks passed

pr Build #20190725.5 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details
@Aaron1011

This comment has been minimized.

Copy link
Contributor

commented Jul 27, 2019

Could this be a const fn?

@sfackler sfackler deleted the sfackler:type-name branch Jul 27, 2019

@SimonSapin

This comment has been minimized.

Copy link
Contributor

commented Jul 28, 2019

Probably? But since this PR is merged, please open a separate issue (or PR) for that.

@Centril

This comment has been minimized.

Copy link
Member

commented Jul 28, 2019

I think it is way premature to make type_name a const fn as that would cause problems for ensuring referential transparency when combined with &mut T.

@SimonSapin

This comment has been minimized.

Copy link
Contributor

commented Jul 28, 2019

I’m not quite sure what that means, but it’s still better discussed in its own thread than in the comments of a merged PR.

@oli-obk

This comment has been minimized.

Copy link
Contributor

commented Jul 28, 2019

I opened a tracking issue #63084 so we have a discussion point. Not saying we ever want to stabilize this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.