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

Bump rust toolchain to 2018-03-24. #20589

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Fixed nonzero.

  • Loading branch information
mrowqa committed Apr 8, 2018
commit 08ea1754075022a4964eff604c3844657fa39131
@@ -353,15 +353,3 @@ impl PartialEq<BrowsingContextId> for TopLevelBrowsingContextId {

// We provide ids just for unit testing.
pub const TEST_NAMESPACE: PipelineNamespaceId = PipelineNamespaceId(1234);
#[allow(unsafe_code)]
#[cfg(feature = "unstable")]
pub const TEST_PIPELINE_INDEX: PipelineIndex = unsafe { PipelineIndex(NonZero::new_unchecked(5678)) };
#[cfg(feature = "unstable")]
pub const TEST_PIPELINE_ID: PipelineId = PipelineId { namespace_id: TEST_NAMESPACE, index: TEST_PIPELINE_INDEX };
#[allow(unsafe_code)]
#[cfg(feature = "unstable")]
pub const TEST_BROWSING_CONTEXT_INDEX: BrowsingContextIndex =
unsafe { BrowsingContextIndex(NonZero::new_unchecked(8765)) };
#[cfg(feature = "unstable")]
pub const TEST_BROWSING_CONTEXT_ID: BrowsingContextId =
BrowsingContextId { namespace_id: TEST_NAMESPACE, index: TEST_BROWSING_CONTEXT_INDEX };

This comment has been minimized.

Copy link
@mrowqa

mrowqa Apr 8, 2018

Author

Failed with:

error[E0015]: calls in constants are limited to constant functions, struct and enum constructors
   --> components/msg/constellation_msg.rs:358:71
    |
358 | pub const TEST_PIPELINE_INDEX: PipelineIndex = unsafe { PipelineIndex(NonZero::new_unchecked(5678)) };
    |                                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0015]: calls in constants are limited to constant functions, struct and enum constructors
   --> components/msg/constellation_msg.rs:364:35
    |
364 |     unsafe { BrowsingContextIndex(NonZero::new_unchecked(8765)) };
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.