Is there a way to merge ParamEnv?

I tried this code:

use syn::{parse::{Parse, ParseStream}};
use syn::{Attribute, Error, Expr, ExprLit, Ident, Lit, LitStr, Meta, Result, Token};


fn parse_attr<const LEN: usize>(path: [&'static str; LEN], attr: &Attribute) -> Option<LitStr> {
    if let Meta::NameValue(name_value) = &attr.meta {
        let path_idents = name_value.path.segments.iter().map(|segment| &segment.ident);

        if itertools::equal(path_idents, path)
            && let Expr::Lit(ExprLit { lit: Lit::Str(s), .. }) = &name_value.value
        {
            return Some(s.clone());
        }
    }

    None
}

I am trying to get the instance of all functions called by a function at the Mir layer.

For some reason, the Instance list I detected is different when I detect this code in the entire project and directly detect this code separately, but the MIR of these two codes is the same (in a workspace and in a crate alone)

The problem I'm having is that when I detect the instance of the function being called inside parse_attr, I don't add the Len const parameter to ParamEnv, so I want to try to add it manually.

But I didn't find the corresponding interface to generate a ParamEnv or add Clauses

rustc --version --verbose:

nightly-2024-10-09

Are you sure that is the code you tried? Syn isn't used anywhere inside the compiler, let alone close to MIR.

sorry, the syn is not the point

I just want to know is there a way to merge ParamEnv ?

Not that I'm aware of. You shouldn't need to anyway.

I explained my problem in this issue. Please help me tell me how to solve the problem of ConstArgHasType passing.