Skip to content

Commit

Permalink
Pass unstable to doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Dec 3, 2024
1 parent c3ea173 commit 0956156
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
2 changes: 0 additions & 2 deletions esp-hal/src/spi/master.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,6 @@ where

#[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
impl<M, T> SetConfig for Spi<'_, M, T>
where
T: Instance,
Expand Down Expand Up @@ -1171,7 +1170,6 @@ mod dma {

#[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
impl<M, T> SetConfig for SpiDma<'_, M, T>
where
T: Instance,
Expand Down
12 changes: 0 additions & 12 deletions esp-hal/src/uart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,6 @@ pub enum ConfigError {

#[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
impl<M, T> SetConfig for Uart<'_, M, T>
where
T: Instance,
Expand All @@ -643,7 +642,6 @@ where

#[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
impl<M, T> SetConfig for UartRx<'_, M, T>
where
T: Instance,
Expand All @@ -659,7 +657,6 @@ where

#[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
impl<M, T> SetConfig for UartTx<'_, M, T>
where
T: Instance,
Expand Down Expand Up @@ -1474,28 +1471,24 @@ where

#[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
impl<T, M> embedded_io::ErrorType for Uart<'_, M, T> {
type Error = Error;
}

#[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
impl<T, M> embedded_io::ErrorType for UartTx<'_, M, T> {
type Error = Error;
}

#[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
impl<T, M> embedded_io::ErrorType for UartRx<'_, M, T> {
type Error = Error;
}

#[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
impl<T, M> embedded_io::Read for Uart<'_, M, T>
where
T: Instance,
Expand All @@ -1508,7 +1501,6 @@ where

#[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
impl<T, M> embedded_io::Read for UartRx<'_, M, T>
where
T: Instance,
Expand All @@ -1529,7 +1521,6 @@ where

#[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
impl<T, M> embedded_io::ReadReady for Uart<'_, M, T>
where
T: Instance,
Expand All @@ -1542,7 +1533,6 @@ where

#[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
impl<T, M> embedded_io::ReadReady for UartRx<'_, M, T>
where
T: Instance,
Expand All @@ -1555,7 +1545,6 @@ where

#[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
impl<T, M> embedded_io::Write for Uart<'_, M, T>
where
T: Instance,
Expand All @@ -1572,7 +1561,6 @@ where

#[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
impl<T, M> embedded_io::Write for UartTx<'_, M, T>
where
T: Instance,
Expand Down
2 changes: 1 addition & 1 deletion xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ fn run_doc_tests(workspace: &Path, args: ExampleArgs) -> Result<()> {
// Determine the appropriate build target, and cargo features for the given
// package and chip:
let target = target_triple(args.package, &chip)?;
let features = vec![chip.to_string()];
let features = vec![chip.to_string(), "unstable".to_string()];

// We need `nightly` for building the doc tests, unfortunately:
let toolchain = if chip.is_xtensa() { "esp" } else { "nightly" };
Expand Down

0 comments on commit 0956156

Please sign in to comment.