You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when I try to upgrade apollo-parser from 0.6.1 to 0.7.1, I have an issue with some types that are not Sync anymore:
error[E0277]: `std::ptr::NonNull<rowan::cursor::NodeData>` cannot be shared between threads safely
--> src/feature_toggle/plugin.rs:74:17
|
74 | impl PluginforFeatureTogglePlugin{
| ^^^^^^^^^^^^^^^^^^^ `std::ptr::NonNull<rowan::cursor::NodeData>` cannot be shared between threads safely
|
= help: within `feature_toggle::plugin::FeatureTogglePlugin`, the trait `std::marker::Sync` is not implemented for `std::ptr::NonNull<rowan::cursor::NodeData>`
note: required because it appears within the type `SyntaxNode`
--> /Users/yannsimon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rowan-0.15.13/src/cursor.rs:146:12
|
146 | pub struct SyntaxNode{
| ^^^^^^^^^^
note: required because it appears within the type `SyntaxNode<GraphQLLanguage>`
--> /Users/yannsimon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rowan-0.15.13/src/api.rs:16:12
|
16 | pub struct SyntaxNode<L:Language>{
| ^^^^^^^^^^
note: required because it appears within the type `Document`
--> /Users/yannsimon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/apollo-parser-0.7.1/src/cst/generated/nodes.rs:19:12
|
19 | pub struct Document{
| ^^^^^^^^
note: required because it appears within the type `PhantomData<Document>`
--> /Users/yannsimon/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/marker.rs:789:12
|
789 | pub struct PhantomData<T: ?Sized>;
| ^^^^^^^^^^^
note: required because it appears within the type `SyntaxTree`
--> /Users/yannsimon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/apollo-parser-0.7.1/src/parser/syntax_tree.rs:55:12
|
55 | pub struct SyntaxTree<T:CstNode = cst::Document>{
| ^^^^^^^^^^
I can fix this one by removing SyntaxTree from the plugin and saving a Arc<String> that I parse each time. It's not the most efficient.
The text was updated successfully, but these errors were encountered:
From @yanns in https://discord.com/channels/1022972389463687228/1117957327216201758/1163481102049083483, via #469 (comment):
The text was updated successfully, but these errors were encountered: