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

Potential fix for nightly problem. #1364

Merged
merged 4 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions engine/src/conversion/analysis/deps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use super::{
};

pub(crate) trait HasDependencies {
fn name(&self) -> &QualifiedName;
fn deps(&self) -> Box<dyn Iterator<Item = &QualifiedName> + '_>;
}

Expand Down Expand Up @@ -46,10 +45,6 @@ impl HasDependencies for Api<FnPrePhase1> {
_ => Box::new(std::iter::empty()),
}
}

fn name(&self) -> &QualifiedName {
self.name()
}
}

impl HasDependencies for Api<FnPhase> {
Expand Down Expand Up @@ -99,8 +94,4 @@ impl HasDependencies for Api<FnPhase> {
_ => Box::new(std::iter::empty()),
}
}

fn name(&self) -> &QualifiedName {
self.name()
}
}
2 changes: 1 addition & 1 deletion gen/cmd/tests/cmd_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::{convert::TryInto, fs::File, io::Write, path::Path};
use std::{fs::File, io::Write, path::Path};

use indexmap::map::IndexMap as HashMap;

Expand Down
28 changes: 26 additions & 2 deletions parser/src/directives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,20 @@
use indexmap::map::IndexMap as HashMap;

use once_cell::sync::OnceCell;
use proc_macro2::Ident;
use proc_macro2::Span;
use proc_macro2::{Ident, TokenStream};
#[cfg(feature = "reproduction_case")]
use proc_macro2::TokenStream;

#[cfg(feature = "reproduction_case")]
use quote::{quote, ToTokens};
use syn::parse::ParseStream;

use crate::config::{Allowlist, AllowlistErr};
use crate::config::AllowlistErr;

#[cfg(feature = "reproduction_case")]
use crate::config::Allowlist;

use crate::directive_names::{EXTERN_RUST_FUN, EXTERN_RUST_TYPE, SUBCLASS};
use crate::{AllowlistEntry, IncludeCppConfig};
use crate::{ParseResult, RustFun, RustPath};
Expand Down Expand Up @@ -115,6 +123,8 @@ pub(crate) trait Directive: Send + Sync {
config: &mut IncludeCppConfig,
span: &Span,
) -> ParseResult<()>;

#[cfg(feature = "reproduction_case")]
fn output<'a>(
&self,
config: &'a IncludeCppConfig,
Expand All @@ -135,6 +145,7 @@ impl Directive for Inclusion {
Ok(())
}

#[cfg(feature = "reproduction_case")]
fn output<'a>(
&self,
config: &'a IncludeCppConfig,
Expand Down Expand Up @@ -164,6 +175,7 @@ impl Directive for Generate {
Ok(())
}

#[cfg(feature = "reproduction_case")]
fn output<'a>(
&self,
config: &'a IncludeCppConfig,
Expand Down Expand Up @@ -201,6 +213,7 @@ impl Directive for GenerateNs {
Ok(())
}

#[cfg(feature = "reproduction_case")]
fn output<'a>(
&self,
config: &'a IncludeCppConfig,
Expand Down Expand Up @@ -237,6 +250,7 @@ impl Directive for GenerateAll {
Ok(())
}

#[cfg(feature = "reproduction_case")]
fn output<'a>(
&self,
config: &'a IncludeCppConfig,
Expand All @@ -262,6 +276,7 @@ impl Directive for Safety {
Ok(())
}

#[cfg(feature = "reproduction_case")]
fn output<'a>(
&self,
config: &'a IncludeCppConfig,
Expand Down Expand Up @@ -299,6 +314,7 @@ where
Ok(())
}

#[cfg(feature = "reproduction_case")]
fn output<'a>(
&self,
config: &'a IncludeCppConfig,
Expand Down Expand Up @@ -331,6 +347,7 @@ where
Ok(())
}

#[cfg(feature = "reproduction_case")]
fn output<'a>(
&self,
config: &'a IncludeCppConfig,
Expand All @@ -357,6 +374,7 @@ impl Directive for ModName {
Ok(())
}

#[cfg(feature = "reproduction_case")]
fn output<'a>(
&self,
config: &'a IncludeCppConfig,
Expand Down Expand Up @@ -384,6 +402,7 @@ impl Directive for Concrete {
Ok(())
}

#[cfg(feature = "reproduction_case")]
fn output<'a>(
&self,
config: &'a IncludeCppConfig,
Expand All @@ -397,6 +416,7 @@ impl Directive for Concrete {
}

struct RustType {
#[allow(dead_code)]
output: bool,
}

Expand All @@ -412,6 +432,7 @@ impl Directive for RustType {
Ok(())
}

#[cfg(feature = "reproduction_case")]
fn output<'a>(
&self,
config: &'a IncludeCppConfig,
Expand Down Expand Up @@ -443,6 +464,7 @@ impl Directive for Subclass {
Ok(())
}

#[cfg(feature = "reproduction_case")]
fn output<'a>(
&self,
config: &'a IncludeCppConfig,
Expand Down Expand Up @@ -477,6 +499,7 @@ impl Directive for ExternRustFun {
Ok(())
}

#[cfg(feature = "reproduction_case")]
fn output<'a>(
&self,
config: &'a IncludeCppConfig,
Expand Down Expand Up @@ -513,6 +536,7 @@ impl Directive for ExternCppType {
Ok(())
}

#[cfg(feature = "reproduction_case")]
fn output<'a>(
&self,
config: &'a IncludeCppConfig,
Expand Down
Loading