-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
E0365 newly triggers on pub(crate) reexports (cannot be re-exported outside) #156264
Copy link
Copy link
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-prioritizeIssue: Indicates that prioritization has been requested for this issue.Issue: Indicates that prioritization has been requested for this issue.S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueneeds-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-prioritizeIssue: Indicates that prioritization has been requested for this issue.Issue: Indicates that prioritization has been requested for this issue.S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueneeds-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I have had trouble creating a minimal repro for this, however I do think this is potentially unwanted breakage. On the latest nightly, I tried compiling the latest version of the
serenitycrate (v0.12.5) and received a compiler error:Code
I tried creating a minimal repro, but no luck. However, the relevant module structure in serenity is described below:
This code by itself is not a repro, however the important thing to note is that the
error::{Result, Error}types are exported publicly at the root level of the crate, and additionally exported as part of the internal prelude that is re-exported within themodel::prelude, but only at thepub(crate)level. This lets other modules within the crate obtain the contents of theinteral::preludemodule by importingmodule::prelude::*.Something to do with this code causes
serenityto no longer compile on nightly-2026-05-06. I was able to bisect down to #156014, specifically this code which is responsible for the error being emitted.Version it worked on
It most recently worked on nightly-2026-05-05:
Version with regression
The most recent nightly fails to build the crate:
@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged