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

Adding comment to function causes "overflow evaluating the requirement" #58188

Closed
kjeremy opened this issue Feb 5, 2019 · 7 comments
Closed
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@kjeremy
Copy link

kjeremy commented Feb 5, 2019

$ rustc --version
rustc 1.32.0 (9fda7c2 2019-01-16)

$ rustup toolchain list
stable-x86_64-pc-windows-msvc (default)

Discovered when running cargo check on rust-analyzer. The command succeeds but adding a comment before (as in // this is a comment before https://github.com/rust-analyzer/rust-analyzer/blob/88702a758f031f33452e9acac621841552ec9f8a/crates/ra_lsp_server/src/main_loop/handlers.rs#L695

causes

$ cargo check
Checking ra_lsp_server v0.1.0 (C:\projects\test\rust-analyzer\crates\ra_lsp_server)
error[E0275]: overflow evaluating the requirement *const ra_hir::path::GenericArg: std::panic::RefUnwindSafe
--> crates\ra_lsp_server\src\main_loop.rs:491:10
|
491 | pool.execute(move || {
| ^^^^^^^
|
= help: consider adding a #![recursion_limit="128"] attribute to your crate
= note: required because it appears within the type core::nonzero::NonZero<*const ra_hir::path::GenericArg>
= note: required because it appears within the type std::ptr::Unique<ra_hir::path::GenericArg>
= note: required because it appears within the type alloc::raw_vec::RawVec<ra_hir::path::GenericArg>
= note: required because it appears within the type std::vec::Vec<ra_hir::path::GenericArg>
= note: required because it appears within the type ra_hir::path::GenericArgs
= note: required because it appears within the type alloc::sync::ArcInner<ra_hir::path::GenericArgs>
= note: required because it appears within the type *const alloc::sync::ArcInner<ra_hir::path::GenericArgs>
= note: required because it appears within the type core::nonzero::NonZero<*const alloc::sync::ArcInner<ra_hir::path::GenericArgs>>
= note: required because it appears within the type std::ptr::NonNull<alloc::sync::ArcInner<ra_hir::path::GenericArgs>>
= note: required because it appears within the type std::sync::Arc<ra_hir::path::GenericArgs>
= note: required because it appears within the type std::option::Option<std::sync::Arc<ra_hir::path::GenericArgs>>
= note: required because it appears within the type ra_hir::path::PathSegment
= note: required because it appears within the type *const ra_hir::path::PathSegment
= note: required because it appears within the type core::nonzero::NonZero<*const ra_hir::path::PathSegment>
= note: required because it appears within the type std::ptr::Unique<ra_hir::path::PathSegment>
= note: required because it appears within the type alloc::raw_vec::RawVec<ra_hir::path::PathSegment>
= note: required because it appears within the type std::vec::Vec<ra_hir::path::PathSegment>
= note: required because it appears within the type ra_hir::path::Path
= note: required because it appears within the type ra_hir::expr::Expr
= note: required because it appears within the type *const ra_hir::expr::Expr
= note: required because it appears within the type core::nonzero::NonZero<*const ra_hir::expr::Expr>
= note: required because it appears within the type std::ptr::Unique<ra_hir::expr::Expr>
= note: required because it appears within the type alloc::raw_vec::RawVec<ra_hir::expr::Expr>
= note: required because it appears within the type std::vec::Vec<ra_hir::expr::Expr>
= note: required because it appears within the type ra_arena::Arena<ra_hir::expr::ExprId, ra_hir::expr::Expr>
= note: required because it appears within the type ra_hir::expr::Body
= note: required because it appears within the type alloc::sync::ArcInner<ra_hir::expr::Body>
= note: required because it appears within the type *const alloc::sync::ArcInner<ra_hir::expr::Body>
= note: required because it appears within the type core::nonzero::NonZero<*const alloc::sync::ArcInner<ra_hir::expr::Body>>
= note: required because it appears within the type std::ptr::NonNull<alloc::sync::ArcInner<ra_hir::expr::Body>>
= note: required because it appears within the type std::sync::Arc<ra_hir::expr::Body>
= note: required because it appears within the type ra_hir::expr::scope::ExprScopes
= note: required because it appears within the type alloc::sync::ArcInner<ra_hir::expr::scope::ExprScopes>
= note: required because it appears within the type *const alloc::sync::ArcInner<ra_hir::expr::scope::ExprScopes>
= note: required because it appears within the type core::nonzero::NonZero<*const alloc::sync::ArcInner<ra_hir::expr::scope::ExprScopes>>
= note: required because it appears within the type std::ptr::NonNull<alloc::sync::ArcInner<ra_hir::expr::scope::ExprScopes>>
= note: required because it appears within the type std::sync::Arc<ra_hir::expr::scope::ExprScopes>
= note: required because of the requirements on the impl of std::panic::RefUnwindSafe for salsa::derived::DerivedStorage<ra_ide_api::db::RootDatabase, ra_hir::db::ExprScopesQuery, salsa::derived::AlwaysMemoizeValue>
= note: required because it appears within the type ra_hir::db::HirDatabaseGroupStorage__<ra_ide_api::db::RootDatabase>
= note: required because it appears within the type ra_ide_api::db::__SalsaDatabaseStorage
= note: required because of the requirements on the impl of std::panic::RefUnwindSafe for salsa::runtime::SharedState<ra_ide_api::db::RootDatabase>
= note: required because it appears within the type alloc::sync::ArcInner<salsa::runtime::SharedState<ra_ide_api::db::RootDatabase>>
= note: required because it appears within the type *const alloc::sync::ArcInner<salsa::runtime::SharedState<ra_ide_api::db::RootDatabase>>
= note: required because it appears within the type core::nonzero::NonZero<*const alloc::sync::ArcInner<salsa::runtime::SharedState<ra_ide_api::db::RootDatabase>>>
= note: required because it appears within the type std::ptr::NonNull<alloc::sync::ArcInner<salsa::runtime::SharedState<ra_ide_api::db::RootDatabase>>>
= note: required because it appears within the type std::sync::Arc<salsa::runtime::SharedState<ra_ide_api::db::RootDatabase>>
= note: required because it appears within the type salsa::runtime::RevisionGuard<ra_ide_api::db::RootDatabase>
= note: required because it appears within the type std::option::Option<salsa::runtime::RevisionGuard<ra_ide_api::db::RootDatabase>>
= note: required because it appears within the type salsa::runtime::Runtime<ra_ide_api::db::RootDatabase>
= note: required because it appears within the type ra_ide_api::db::RootDatabase
= note: required because of the requirements on the impl of ra_db::CheckCanceled for ra_ide_api::db::RootDatabase
= note: required because of the requirements on the impl of ra_db::SourceDatabase for ra_ide_api::db::RootDatabase
= note: required because of the requirements on the impl of salsa::plumbing::QueryGroup<ra_ide_api::db::RootDatabase> for ra_db::SourceDatabaseStorage
= note: required because it appears within the type ra_ide_api::db::__SalsaDatabaseStorage
= note: required because it appears within the type salsa::runtime::SharedState<ra_ide_api::db::RootDatabase>
= note: required because of the requirements on the impl of std::marker::Send for std::sync::Arc<salsa::runtime::SharedState<ra_ide_api::db::RootDatabase>>
= note: required because it appears within the type salsa::runtime::RevisionGuard<ra_ide_api::db::RootDatabase>

error: aborting due to previous error

For more information about this error, try rustc --explain E0275.
error: Could not compile ra_lsp_server.

@jonas-schievink jonas-schievink added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Feb 5, 2019
@jonas-schievink
Copy link
Contributor

Can reproduce. Starts working again after running cargo clean, so marking as incr. comp. bug

@jonas-schievink jonas-schievink added the A-incr-comp Area: Incremental compilation label Feb 5, 2019
@jonas-schievink
Copy link
Contributor

Ah, looks like this is already fixed on nightly though. Can someone confirm?

@kjeremy
Copy link
Author

kjeremy commented Mar 1, 2019

Still happening on 1.33.0

@jonas-schievink
Copy link
Contributor

@kjeremy can you try on nightly/beta please?

@kjeremy
Copy link
Author

kjeremy commented Mar 13, 2019

This particular error doesn't seem to happen on nightly anymore.

@jonas-schievink jonas-schievink added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Mar 29, 2019
@JohnTitor JohnTitor added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Aug 19, 2020
@Dylan-DPC
Copy link
Member

@kjeremy can you confirm if this still occurs on the latest stable & nightly? or is this fixed already? [sorry for the 4 year later ping :P ]

@apiraino
Copy link
Contributor

Closing as this incr-comp issue is old and we never managed to obtain an MCVE or a way to reproduce. the issue is supposedly fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants