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

Convert warning about `*const _` to a future-compat lint #46914

Merged
merged 5 commits into from Dec 25, 2017

Conversation

Projects
None yet
5 participants
@mikeyhew
Contributor

mikeyhew commented Dec 21, 2017

#46664 was merged before I could convert the soft warning about method lookup on *const _ into a future-compatibility lint. This PR makes that change.

fixes #46837
tracking issue for the future-compatibility lint: #46906

r? @arielb1

@arielb1

This comment has been minimized.

Show comment
Hide comment
@arielb1

arielb1 Dec 21, 2017

Contributor

Needs a rebase

Contributor

arielb1 commented Dec 21, 2017

Needs a rebase

@arielb1

This comment has been minimized.

Show comment
Hide comment
@arielb1

arielb1 Dec 21, 2017

Contributor

r=me with a rebase

Contributor

arielb1 commented Dec 21, 2017

r=me with a rebase

@mikeyhew

This comment has been minimized.

Show comment
Hide comment
@mikeyhew

mikeyhew Dec 22, 2017

Contributor

Oh true, I had a hunch this would cause an error because of deny(warnings). I'll update libstd and push again

Contributor

mikeyhew commented Dec 22, 2017

Oh true, I had a hunch this would cause an error because of deny(warnings). I'll update libstd and push again

@arielb1

This comment has been minimized.

Show comment
Hide comment
@arielb1

arielb1 Dec 22, 2017

Contributor

Still errors in rustc_data_structures

Contributor

arielb1 commented Dec 22, 2017

Still errors in rustc_data_structures

@CAD97

This comment has been minimized.

Show comment
Hide comment
@CAD97

CAD97 Dec 23, 2017

Contributor

These further changes got my local copy (x86_64-pc-windows-msvc) to pass a local test:

EDIT: (Well, most of one. Didn't have Make installed yet so those tests failed and prevented the rustdoc tests apparently)

src/librustc_data_structures/array_vec.rs

-141        let arr = &mut self.values as &mut [ManuallyDrop<_>];
+141        let arr = &mut self.values as &mut [ManuallDrop<<A as Array>::Element>];
...
-263        let arr = &mut source_array_vec.values as &mut [ManualyDrop<_>];
+263        let arr =
+264            &mut source_array_vec.values as &mut [ManuallyDrop<<A as Array>::Element>];

src/libstd/sys/windows/fs.rs

-773      let buf = &mut (*db).ReparseTarget as *mut _;
+773        let buf = &mut (*db).ReparseTarget as *mut c::WCHAR;

commit at CAD97@0563701 if you just want to add that to the PR.

Contributor

CAD97 commented Dec 23, 2017

These further changes got my local copy (x86_64-pc-windows-msvc) to pass a local test:

EDIT: (Well, most of one. Didn't have Make installed yet so those tests failed and prevented the rustdoc tests apparently)

src/librustc_data_structures/array_vec.rs

-141        let arr = &mut self.values as &mut [ManuallyDrop<_>];
+141        let arr = &mut self.values as &mut [ManuallDrop<<A as Array>::Element>];
...
-263        let arr = &mut source_array_vec.values as &mut [ManualyDrop<_>];
+263        let arr =
+264            &mut source_array_vec.values as &mut [ManuallyDrop<<A as Array>::Element>];

src/libstd/sys/windows/fs.rs

-773      let buf = &mut (*db).ReparseTarget as *mut _;
+773        let buf = &mut (*db).ReparseTarget as *mut c::WCHAR;

commit at CAD97@0563701 if you just want to add that to the PR.

@mikeyhew

This comment has been minimized.

Show comment
Hide comment
@mikeyhew

mikeyhew Dec 23, 2017

Contributor

@CAD97 thanks! I develop on OSX, so would have had to wait for AppVeyor to fail before I could fix the windows errors

Contributor

mikeyhew commented Dec 23, 2017

@CAD97 thanks! I develop on OSX, so would have had to wait for AppVeyor to fail before I could fix the windows errors

@arielb1

This comment has been minimized.

Show comment
Hide comment
@arielb1

arielb1 Dec 23, 2017

Contributor

doc test failure:

[01:12:44] ---- ptr.rs - ptr::*mut T::copy_from (line 1827) stdout ----
[01:12:44] 	error: the type of this value must be known in this context
[01:12:44]   --> ptr.rs:10:22
[01:12:44]    |
[01:12:44] 10 |     dst.as_mut_ptr().copy_from(ptr, elts);
[01:12:44]    |                      ^^^^^^^^^
[01:12:44]    |
[01:12:44] note: lint level defined here
[01:12:44]   --> ptr.rs:1:9
[01:12:44]    |
[01:12:44] 1  | #![deny(warnings)]
[01:12:44]    |         ^^^^^^^^
[01:12:44]    = note: #[deny(tyvar_behind_raw_pointer)] implied by #[deny(warnings)]
[01:12:44]    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
[01:12:44]    = note: for more information, see issue #46906 <https://github.com/rust-lang/rust/issues/46906>
[01:12:44] 
[01:12:44] thread 'rustc' panicked at 'couldn't compile the test', /checkout/src/librustdoc/test.rs:286:12
[01:12:44] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:12:44] 
[01:12:44] ---- ptr.rs - ptr::*mut T::copy_from_nonoverlapping (line 1866) stdout ----
[01:12:44] 	error: the type of this value must be known in this context
[01:12:44]   --> ptr.rs:10:22
[01:12:44]    |
[01:12:44] 10 |     dst.as_mut_ptr().copy_from_nonoverlapping(ptr, elts);
[01:12:44]    |                      ^^^^^^^^^^^^^^^^^^^^^^^^
[01:12:44]    |
[01:12:44] note: lint level defined here
[01:12:44]   --> ptr.rs:1:9
[01:12:44]    |
[01:12:44] 1  | #![deny(warnings)]
[01:12:44]    |         ^^^^^^^^
[01:12:44]    = note: #[deny(tyvar_behind_raw_pointer)] implied by #[deny(warnings)]
[01:12:44]    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
[01:12:44]    = note: for more information, see issue #46906 <https://github.com/rust-lang/rust/issues/46906>
[01:12:44] 
[01:12:44] thread 'rustc' panicked at 'couldn't compile the test', /checkout/src/librustdoc/test.rs:286:12
[01:12:44] 
[01:12:44] 
[01:12:44] failures:
[01:12:44]     ptr.rs - ptr::*mut T::copy_from (line 1827)
[01:12:44]     ptr.rs - ptr::*mut T::copy_from_nonoverlapping (line 1866)
Contributor

arielb1 commented Dec 23, 2017

doc test failure:

[01:12:44] ---- ptr.rs - ptr::*mut T::copy_from (line 1827) stdout ----
[01:12:44] 	error: the type of this value must be known in this context
[01:12:44]   --> ptr.rs:10:22
[01:12:44]    |
[01:12:44] 10 |     dst.as_mut_ptr().copy_from(ptr, elts);
[01:12:44]    |                      ^^^^^^^^^
[01:12:44]    |
[01:12:44] note: lint level defined here
[01:12:44]   --> ptr.rs:1:9
[01:12:44]    |
[01:12:44] 1  | #![deny(warnings)]
[01:12:44]    |         ^^^^^^^^
[01:12:44]    = note: #[deny(tyvar_behind_raw_pointer)] implied by #[deny(warnings)]
[01:12:44]    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
[01:12:44]    = note: for more information, see issue #46906 <https://github.com/rust-lang/rust/issues/46906>
[01:12:44] 
[01:12:44] thread 'rustc' panicked at 'couldn't compile the test', /checkout/src/librustdoc/test.rs:286:12
[01:12:44] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:12:44] 
[01:12:44] ---- ptr.rs - ptr::*mut T::copy_from_nonoverlapping (line 1866) stdout ----
[01:12:44] 	error: the type of this value must be known in this context
[01:12:44]   --> ptr.rs:10:22
[01:12:44]    |
[01:12:44] 10 |     dst.as_mut_ptr().copy_from_nonoverlapping(ptr, elts);
[01:12:44]    |                      ^^^^^^^^^^^^^^^^^^^^^^^^
[01:12:44]    |
[01:12:44] note: lint level defined here
[01:12:44]   --> ptr.rs:1:9
[01:12:44]    |
[01:12:44] 1  | #![deny(warnings)]
[01:12:44]    |         ^^^^^^^^
[01:12:44]    = note: #[deny(tyvar_behind_raw_pointer)] implied by #[deny(warnings)]
[01:12:44]    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
[01:12:44]    = note: for more information, see issue #46906 <https://github.com/rust-lang/rust/issues/46906>
[01:12:44] 
[01:12:44] thread 'rustc' panicked at 'couldn't compile the test', /checkout/src/librustdoc/test.rs:286:12
[01:12:44] 
[01:12:44] 
[01:12:44] failures:
[01:12:44]     ptr.rs - ptr::*mut T::copy_from (line 1827)
[01:12:44]     ptr.rs - ptr::*mut T::copy_from_nonoverlapping (line 1866)
@arielb1

This comment has been minimized.

Show comment
Hide comment
@arielb1

arielb1 Dec 23, 2017

Contributor

@bors r+

Contributor

arielb1 commented Dec 23, 2017

@bors r+

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Dec 23, 2017

Contributor

📌 Commit 60e6629 has been approved by arielb1

Contributor

bors commented Dec 23, 2017

📌 Commit 60e6629 has been approved by arielb1

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Dec 25, 2017

Contributor

⌛️ Testing commit 60e6629 with merge a6fc844...

Contributor

bors commented Dec 25, 2017

⌛️ Testing commit 60e6629 with merge a6fc844...

bors added a commit that referenced this pull request Dec 25, 2017

Auto merge of #46914 - mikeyhew:raw_pointer_self, r=arielb1
Convert warning about `*const _` to a future-compat lint

#46664 was merged before I could convert the soft warning about method lookup on `*const _` into a future-compatibility lint. This PR makes that change.

fixes #46837
tracking issue for the future-compatibility lint: #46906

r? @arielb1
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Dec 25, 2017

Contributor

☀️ Test successful - status-appveyor, status-travis
Approved by: arielb1
Pushing a6fc844 to master...

Contributor

bors commented Dec 25, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: arielb1
Pushing a6fc844 to master...

@bors bors merged commit 60e6629 into rust-lang:master Dec 25, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment